--- id: django-countries version: "9.0.0" license: MIT license_treatment: permissive maintenance: active --- # django-countries — Provides a country field for Django models. License: permissive · Maintenance: active · Downloads: 2.3M/mo ## What it is and what it does django-countries is a Django application that adds a reusable country field to your models, backed by the ISO 3166-1 standard. It ships with static flag icon files, automatic translation of country names via Django's i18n system, and built-in support for Django REST Framework and graphene-django. The package has been in active development since 2014 and is currently maintained for modern Django and Python versions. You use it by adding the app to INSTALLED_APPS and then importing CountryField into your models. It handles country validation, serialization, and rendering out of the box. The field integrates cleanly with Django forms and the REST Framework, so you get country dropdowns and API representations without extra glue code. Use it for: - Add a country selector to user profiles or address forms with automatic flag display and translated country names. - Build REST APIs that accept and return country data with proper serialization and validation. - Store and query country information in multi-tenant or international applications without managing your own country list. - Support multiple country selection in a single model field for applications that need to track regions or service areas. - Localize country names in different languages automatically using Django's translation framework. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides a Django model field for storing country data with built-in support for ISO 3166-1 countries, translated names, flag icons, and REST Framework integration. Yes. django-countries is a mature, actively maintained package with low install friction, permissive licensing, no known vulnerabilities, and solid support for current Django and Python versions. Install it if you need country fields in Django models; the time saved on country data management and REST Framework integration justifies the dependency. ## Install pip install django-countries uv add django-countries poetry add django-countries ## Installing django-countries Before you install: Low install friction with only two runtime dependencies (asgiref, typing-extensions). Active maintenance with recent commits and a stable production status across Python 3.10–3.14 and Django 4.2, 5.2, and 6.0. License in practice: MIT license (permissive) means you can use this package freely in commercial and private projects with minimal restrictions. Quickstart: pip install django-countries # In Django settings.py INSTALLED_APPS = [ 'django_countries', ] # In your model from django_countries.fields import CountryField class Person(models.Model): country = CountryField() Requires Django 4.2 or later and Python 3.10 or later. Verify before relying: - Whether translated country names cover all supported languages or a subset of common locales. - Performance characteristics when handling large datasets with country field queries. - Exact scope of GraphQL support and whether it requires additional dependencies beyond graphene-django. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 2.3M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags django country field, country selection django, flag icons django, django rest framework countries, iso 3166 django, multilingual country names, django model country, django-orm, internationalization, rest-api [View on SkillFed](https://skillfed.io/packages/django-countries) · [View on PyPI](https://pypi.org/project/django-countries/)