A django model & fixture containing all data from the countries table of Geonames.org
Project description
===========
django-countries-plus
===========
django-countries-plus provides a model and fixture containing all top level country data from Geonames.org (http://download.geonames.org/export/dump/countryInfo.txt)
The model provides the following fields (original geonames.org column name in parentheses).
* iso (ISO)
* iso3 (ISO3)
* iso_numeric (ISO-Numeric)
* fips (fips)
* name (Country)
* capital
* area (Area(in sq km))
* population (population)
* continent (continent)
* tld (tld)
* currency_code (CurrencyCode)
* currency_name (CurrencyName)
* phone (Phone)
* postal_code_format (Postal Code Format)
* postal_code_regex (Postal Code Regex)
* languages (Languages)
* geonameid (geonameid)
* neighbors (neighbours)
* equivalent_fips_code (EquivalentFipsCode)
------------
Installation
------------
::
pip install django-countries-plus
------------
Usage
------------
1. Add countriesplus to your INSTALLED_APPS
2. Sync your fixtures::
python manage.py syncdb
3. In your code use::
from countriesplus.models import Country
usa = Country.objects.get(iso3='USA')
django-countries-plus
===========
django-countries-plus provides a model and fixture containing all top level country data from Geonames.org (http://download.geonames.org/export/dump/countryInfo.txt)
The model provides the following fields (original geonames.org column name in parentheses).
* iso (ISO)
* iso3 (ISO3)
* iso_numeric (ISO-Numeric)
* fips (fips)
* name (Country)
* capital
* area (Area(in sq km))
* population (population)
* continent (continent)
* tld (tld)
* currency_code (CurrencyCode)
* currency_name (CurrencyName)
* phone (Phone)
* postal_code_format (Postal Code Format)
* postal_code_regex (Postal Code Regex)
* languages (Languages)
* geonameid (geonameid)
* neighbors (neighbours)
* equivalent_fips_code (EquivalentFipsCode)
------------
Installation
------------
::
pip install django-countries-plus
------------
Usage
------------
1. Add countriesplus to your INSTALLED_APPS
2. Sync your fixtures::
python manage.py syncdb
3. In your code use::
from countriesplus.models import Country
usa = Country.objects.get(iso3='USA')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for django-countries-plus-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0754dc9c0a7a70bf5cf20699180d9cc775b996c8676f8c9f0ccb2fd8bdb2ca9 |
|
MD5 | ec948742ec403faa6be4337382a603a8 |
|
BLAKE2b-256 | ce146210af801f366c05cec69bc174a2b68ca19c1168ca5a9b97f80c07e5fce6 |