Provides a country field for Django models.
Project description
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.8, 3.9, 3.10, 3.11, 3.12, 3.13
- Django: 3.2 (LTS), 4.2 (LTS), 5.0, 5.1, 5.2
- Django REST Framework: 3.11+
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.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_countries-8.2.0.tar.gz.
File metadata
- Download URL: django_countries-8.2.0.tar.gz
- Upload date:
- Size: 2.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6df3883180599052c7dfa9a8be0601792441cfb248935dc229ad1ac92e9e39e3
|
|
| MD5 |
8f13730b5e40f00933dbe399107c9018
|
|
| BLAKE2b-256 |
672eed67f8f460d1de25ee64fca5d7f219680f944fc8ac5a29fbede3574dc3db
|
File details
Details for the file django_countries-8.2.0-py3-none-any.whl.
File metadata
- Download URL: django_countries-8.2.0-py3-none-any.whl
- Upload date:
- Size: 3.8 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2b2617bec7c15dc735bdec38ae89f0058e38fddfffdb19a7f6b75ef1e3d5380f
|
|
| MD5 |
88d2e6fae92d9a9cdfbfe20ba0b901d6
|
|
| BLAKE2b-256 |
203c9ebd7ed021b7c519bac954bc88146bc870e7d3c8db2580fa67268464fd2e
|