Skip to main content

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')

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-countries-plus-0.1.0.tar.gz (2.7 kB view details)

Uploaded Source

File details

Details for the file django-countries-plus-0.1.0.tar.gz.

File metadata

File hashes

Hashes for django-countries-plus-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d76eabf4c8e9727ebd12eca3cc2b98cc41b704f17b362f43a1ec1fe1ea7eb211
MD5 a93e11731de03a91c69a10c065409a3a
BLAKE2b-256 949d8f5831891f57267bd10f741132a407b50e74aabdf8826d1f155e2faef193

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page