Tuesday 15 July 2014

python - Django City Model -



python - Django City Model -

my application going require maintain list of cities in database. database has table of zipcodes (the primary key), each of has field called city (there nil international). know mapping not 1-1 in real life, still manage associate each zip primary city.

there going many forms user needs come in city, , in turn need map zipcode. city entered need match 1 of cities in database (we going preload these). how can indicate contents of choices attribute on city field should contents exist in zipcode table city column? should assign choices attribute function returns info in appropriate format? wouldn't have performance implications? or should precompute massive file , utilize instead? or forgo using choices attribute? little guidance great.

thank you.

python django

No comments:

Post a Comment