--- id: django-localflavor version: "5.1" license: BSD-3-Clause license_treatment: permissive maintenance: active --- # django-localflavor — Country-specific Django helpers License: permissive · Maintenance: active · Downloads: 1.0M/mo ## What it is and what it does django-localflavor is a standalone Django package that provides localized form fields and validators for specific countries and regions. It was originally part of Django's core but was separated to keep the framework lean. The package includes postal code validators, government ID number fields, and other country-specific helpers that integrate seamlessly with Django's form system. The package depends on Django and python-stdnum for validation logic. It actively supports modern Django versions (4.2 through 6.0) and Python 3.9+. The project is actively maintained with recent releases and regular commits, making it suitable for production use in applications that need localized form handling. Use it for: - Validate postal codes in a user registration form for a specific country - Build a Django form with country-specific government ID number fields for compliance - Localize form validation rules across a multi-country web application - Add region-specific address or tax ID validation to checkout flows ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides country-specific form fields, validators, and helpers for Django applications, such as postal code formats and government ID number validation tailored to individual countries. Yes. The package is actively maintained, has low install friction, carries a permissive license, and solves a real problem for Django applications serving specific countries. Install it when you need country-specific form validation; skip it if your application is country-agnostic or uses a custom validation layer. ## Install pip install django-localflavor uv add django-localflavor poetry add django-localflavor ## Installing django-localflavor Before you install: Low install friction with a pure Python wheel. Actively maintained with a recent release (13 days old) and steady commits. Requires Django and python-stdnum as runtime dependencies. License in practice: BSD-3-Clause permissive license allows use in commercial and private projects with minimal restrictions; attribution required. Quickstart: pip install django-localflavor from django_localflavor.us.forms import USStateField field = USStateField() Requires Django 4.2, 5.0, 5.1, 5.2, or 6.0; Python 3.9 or later. Verify before relying: - Which specific countries or regions are currently supported by version 5.1 - Whether breaking data changes in version 5.1 affect existing deployments beyond LV, NP, NO flavors mentioned ## Package facts - License: BSD-3-Clause (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 1.0M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags django country-specific form fields, postal code validation by country, django localflavor, government id validation django, country-specific django helpers, django localized form validators, regional django form fields, django-forms, localization, validation [View on SkillFed](https://skillfed.io/packages/django-localflavor) · [View on PyPI](https://pypi.org/project/django-localflavor/)