Snippet List
Just a dump of a countries data, including standard codes & dial-codes, based on the following model:
- Country
-- name : CharField
-- code : CharField
-- dial_code : CharField
Note that countries aren't unique, as some may have several intl. dial codes.
You can parse it using script or load it using the loaddata command.
- json
- fixtures
- data
- country
- countries
- codes
- dial_codes
- international
**Adapted from** [CountryField](http://www.djangosnippets.org/snippets/494/) - **Initial thanks to marinho**
Uses the UN country list listed in the source - this provides the 3 character ISO country code.
Ordered by display value and not country code.
Just place anywhere you like and import CountryField to use.
`country = CountryField(verbose_name="Country", help_text="The registrant's country of residence.")`
- forms
- form
- field
- list
- country
- countries
- custom
- custom-field
- countryfield
- countrys
Here's some fairly normalized models for representing postal addresses. Making postal_code a separate model would probably be the only way to get it to a level that everyone would agree is 2NF, but we handle a lot of international addresses so that isn't really feasible.
Country and StateProvince are intended to be populated with data from ISO 3166. I'd include the SQL I used with that data, but it's very long and there's no attach feature. Also, I'd probably be violating ISO's copyright.
5 snippets posted so far.