# SmileyChris/django-countries

A Django application that provides country choices for use with forms, flag icons static files, and a country field for models.

Repository: https://github.com/SmileyChris/django-countries
Canonical: https://ross.abutalabs.com/products/django-countries
Homepage: http://smileychris.github.io/django-countries/
Language: Python
License: MIT
License Family: permissive
Topics: python, country-codes, django
Last push: 2026-06-10T00:39:36+00:00

## Health v2 (maintenance only)
Score: 71/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 86, release rhythm 35, longevity 100
- inputs: {"age_days": 4821, "days_push": 85, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1532, forks 301 (observed 2026-08-28T04:04:59.426112+00:00)

## What it is
A Django application providing a CountryField model field with all ISO 3166-1 countries, translated country names, and static flag icon files. It includes integrations for Django forms, Django REST Framework, and graphene-django GraphQL.

## Use cases
- add a country field to a Django model
- populate a country dropdown in a Django form
- display flag icons for countries in templates
- serialize country fields with Django REST Framework
- expose country choices via GraphQL
- support multiple country selection in forms
- get translated country names for i18n

## When to choose
- you are building a Django or DRF project that needs country selection or country data
- you want ISO 3166-1 country codes with localized names out of the box
- you need flag icon static assets bundled with your Django app

## When to avoid
- you are not using Django or a Django-based stack
- you need country data beyond ISO 3166-1 such as states, cities, or postal codes
- you need a general-purpose geocoding or geography library

## Facets
- artifact type: library
- maturity: stable
- function: ui-components, internationalization, form-handling
- domain: web-development, backend
- platform: python
- tags: django, country-codes, iso-3166, flag-icons, django-rest-framework, graphql, localization, web-server

## Member repositories
- SmileyChris/django-countries (main) score 71

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:59.426112+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:31:18.053763+00:00, confidence not recorded.
  - readme: https://github.com/SmileyChris/django-countries (fetched 2026-08-28T04:04:59.426112+00:00, sha 321bfdbe91de)
  - homepage: http://smileychris.github.io/django-countries/ (fetched 2026-08-29T11:33:30.774998+00:00, sha 249308c1abe6)
  - registry_pypi: https://pypi.org/pypi/django-countries/json (fetched 2026-08-29T11:33:30.784021+00:00, sha b9bd733d8638)
- Data as of 2026-08-30T08:39:29.467469+00:00.
