+A Django application which provides country choices for use with forms, and
+a country field for models.
+To use the flags, you will want to copy the flags directory of
+``django_countries/media`` to your static files directory, or use the
+.. _django-staticfiles: http://pypi.python.org/pypi/django-staticfiles/
+A country field for Django models that provides all ISO 3166-1 countries as
+``CountryField`` is based on Django's ``CharField``, providing choices
+corresponding to the official ISO 3166-1 list of countries (with a default
+Consider the following model using a ``CountryField``::
+ from django.db import models
+ from django_countries import CountryField
+ class Person(models.Model):
+ name = models.CharField(max_length=100)
+ country = CountryField()
+Any ``Person`` instance will have a ``country`` attribute that you can use to
+get details of the person's country:
+>>> person = Person(name='Chris', country='NZ')
+This object (``person.country`` in the example) is a ``Country`` instance,
+which is described below.
+An object used to represent a country, instanciated with a two character
+It can be compared to other objects as if it was a string containing the
+country code, and it's ``__unicode__`` method returns the country code.
+ Contains the full country name.
+ Contains a URL to the flag. ``'flags/[lowercasecountrycode].gif'`` is
+ appended to the ``STATIC_URL`` setting, or if that isn't set, the
+The ``django_countries.countries`` module contains some constants which can be
+used to generate choices lists for a Django ``Select`` form field.
+ A tuple of two part tuples, each consisting of a country code and the
+ corresponding nicely titled (and translatable) country name.
+ A tuple, similar to ``COUNTRIES``, but also includes duplicates for countries
+ that contain a comma (i.e. the non-comma'd version).
+ A dictionary where each key is a country code and each value is the
+ corresponding official capitalised ISO 3166-1 English country name.