A Django application that provides country choices for use with forms, flag icons static files, and a country field for models.
See the code
A Django application that provides country choices for use with forms, flag icons static files, and a country field for models.
Install:
pip install django-countries
Add to INSTALLED_APPS:
INSTALLED_APPS = [
# ...
'django_countries',
]
Use in your models:
from django_countries.fields import CountryField
class Person(models.Model):
country = CountryField()
Contributions are welcome! See the Contributing Guide for details.
Country names are translated using Django's standard gettext and imported from our Transifex project.
Overall
Maintained
Code review
PyPI
Latest release
Releases this year
268 followers · starred May 2014
146 followers · starred May 2025
96 followers · starred Jan 2019
110 followers · starred Apr 2016
A Django application that provides country choices for use with forms, flag icons static files, and a country field for models.
See the code
A Django application that provides country choices for use with forms, flag icons static files, and a country field for models.
Install:
pip install django-countries
Add to INSTALLED_APPS:
INSTALLED_APPS = [
# ...
'django_countries',
]
Use in your models:
from django_countries.fields import CountryField
class Person(models.Model):
country = CountryField()
Contributions are welcome! See the Contributing Guide for details.
Country names are translated using Django's standard gettext and imported from our Transifex project.
Overall
Maintained
Code review
PyPI
Latest release
Releases this year
268 followers · starred May 2014
146 followers · starred May 2025
96 followers · starred Jan 2019
110 followers · starred Apr 2016