Django Countries
A Django application that provides country choices for use with forms, flag icons static files, and a country field for models.
Documentation
Quick Start
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()
Features
- Country Field: Django model field with all ISO 3166-1 countries
- Translated Names: Country names translated using Django's i18n system
- Flag Icons: Static flag image files for all countries
- REST Framework: Full Django REST Framework integration
- GraphQL: Support for graphene-django
- Multiple Selection: Support for multiple country selection
Support
- Python: 3.10, 3.11, 3.12, 3.13, 3.14
- Django: 4.2 (LTS), 5.2 (LTS), 6.0, 6.1
- Django REST Framework: 3.14+
Contributing
Contributions are welcome! See the Contributing Guide for details.
Translations
Country names are translated using Django's standard gettext and imported from our Transifex project.
Metadata
Release files for django-countries 9.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django_countries-9.1.0.tar.gz | 614.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_countries-9.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.5 MB
Release files / django_countries-9.1.0.tar.gz
| Download URL | django_countries-9.1.0.tar.gz |
|---|---|
| Size | 614.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c1027417e1d1ebad5ac8fbc45a7578fc400c4fc895d6b865e001c16ba4be0939
|
|
BLAKE2b-256 checksum How to use checksums |
de7e54c144d213ccdd4f3e74e044c4b6cb7a0c2ccf2e738886fd61b9a0a376df
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Manjaro Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / django_countries-9.1.0-py3-none-any.whl
| Download URL | django_countries-9.1.0-py3-none-any.whl |
|---|---|
| Size | 928.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
18c9f6e1a8e32356656b1db5ee94121310cbc3b91dc78171052a9ef9d57d5318
|
|
BLAKE2b-256 checksum How to use checksums |
9c86f4a3a1bc0827e19bd0ec7267d80725e4f02916d34a279747672436a0aa5b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Manjaro Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|