Analysis updated 2026-07-08 · repo last pushed 2026-06-23
Build a signup form that correctly validates postal codes for users in multiple countries.
Create a dropdown menu that lists states or provinces for a specific country.
Validate country-specific government ID numbers like an Icelandic national identification number.
Collect accurate international addresses without researching each country's format rules.
| django/django-localflavor | python/pyperformance | google-research/tabfm | |
|---|---|---|---|
| Stars | 919 | 1,021 | 1,041 |
| Language | Python | Python | Python |
| Last pushed | 2026-06-23 | 2026-07-01 | 2026-07-03 |
| Maintenance | Active | Active | Active |
| Setup difficulty | easy | easy | moderate |
| Complexity | 2/5 | 2/5 | 3/5 |
| Audience | developer | developer | data |
Figures from each repo's GitHub metadata at analysis time.
Simply install via pip and import the desired country-specific fields into your Django forms.
django-localflavor is a collection of pre-built tools for Django web applications that handle country-specific forms and data validation. If you are building a website that asks users for their postal code, state/province selection, or government ID number, this package gives you ready-made form fields that know the correct format and rules for dozens of countries. Instead of writing your own validation logic to check whether a Brazilian CEP or a Dutch postcode is valid, you can plug in the appropriate field and it handles the checking for you. At a high level, the package provides form fields and widgets organized by country. Each country has its own set of components, for example, a form field for French postal codes, a dropdown of German states, or a validator for Icelandic national identification numbers. You use these the same way you would use Django's built-in form fields, just with country-specific logic under the hood. The package was originally part of Django itself but was split out into a separate project to keep the core framework focused. This is useful for founders, product managers, or developers building applications with an international audience. If your signup flow needs to collect addresses from users in Japan, Australia, and Canada, you would otherwise need to research and implement the correct formats yourself for each country. This library does that work for you. One thing to note: it no longer handles phone number validation, the maintainers point users to a separate package for that, since phone number rules are complex enough to warrant their own dedicated project. The project is actively maintained and tracks recent versions of Django. Some releases include breaking changes for specific countries' data formats, so anyone upgrading should check the changelog. Beyond that, the README does not go into detail about the full list of supported countries, pointing instead to the project's documentation site for that information.
A collection of ready-made Django form fields and validators that know the correct format and rules for country-specific data like postal codes, states, and government IDs for dozens of countries.
Mainly Python. The stack also includes Python, Django.
Active — commit in last 30 days (last push 2026-06-23).
Licensed under BSD, which means you can freely use it in commercial and personal projects as long as you keep the copyright notice.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.