entirius-django-regional
A Django module with regional reference data for Entirius, the open-source modular ecommerce platform: countries, currencies and languages. Other modules point their foreign keys at these tables; the data ships as a fixture and a read-only admin API lists it.
What it does
- Provides the
Country,CurrencyandLanguagemodels keyed by ISO codes. - Seeds countries with dialling prefixes, currency symbols and default currencies in its migration.
- Ships the
regional-defaultsfixture as the place where reference data is changed. - Keeps country rows read-only:
Country.save()raises, changes go through the fixture and migrations. - Lists languages, currencies and countries over a read-only admin API under
/api/regional/v2/admin/.
Installation
uv add entirius-django-regional
pip install entirius-django-regional
INSTALLED_APPS = [
...
"django_regional",
]
# urls.py
urlpatterns = [
path("", include("django_regional.urls")),
]
python manage.py migrate
python manage.py loaddata regional-defaults # optional: the defaults fixture
The module has no settings of its own.
Quick start
from django_regional.models import Country, Currency, Language
country = Country.getFromIso2("PL") # country codes are stored upper-case
language = Language.getFromIso2("pl") # language codes are stored lower-case
currency = Currency.getFromiso3("PLN")
Requirements
- Python 3.11 or newer, Django 4.2 or newer.
- Django REST Framework,
djangorestframework-simplejwt,pydantic,drf-spectacular,pyyaml. - No other Entirius packages.
Documentation
- Module docs: https://github.com/entirius/entirius-django-regional/tree/develop/docs
- Entirius documentation: https://docs.entirius.com/
- Changelog: https://github.com/entirius/entirius-django-regional/blob/develop/CHANGELOG.md
Part of Entirius
This module runs inside the Entirius backend service (Volkanos) as the shared source of countries, currencies and languages.
- Backend service: https://github.com/entirius/entirius-service-volkanos
- Docker harness: https://github.com/entirius/entirius-zeno
- Sibling modules: https://github.com/entirius/entirius-django-pim, https://github.com/entirius/entirius-django-email, https://github.com/entirius/entirius-django-accounts
Development
make install # sync dependencies (uv)
make check # lint + format check (ruff)
make test # test suite (pytest + pytest-django, sqlite in-memory)
Development and agent instructions: https://github.com/entirius/entirius-django-regional/blob/develop/AGENTS.md
License
Mozilla Public License 2.0 (MPL-2.0) — see https://github.com/entirius/entirius-django-regional/blob/develop/LICENSE.
Metadata
Release files for entirius-django-regional 2.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| entirius_django_regional-2.1.0.tar.gz | 70.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| entirius_django_regional-2.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 104.0 kB
Release files / entirius_django_regional-2.1.0.tar.gz
| Download URL | entirius_django_regional-2.1.0.tar.gz |
|---|---|
| Size | 70.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bc329444482b38c26aaca0f6ae4e73cd706f7e6abb6cc632e9ba1d0895410db4
|
|
BLAKE2b-256 checksum How to use checksums |
f56c1c8f33ac3bec49f91dae7165858ee658fca1a2be8be1acdf159ccf17cf8e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / entirius_django_regional-2.1.0-py3-none-any.whl
| Download URL | entirius_django_regional-2.1.0-py3-none-any.whl |
|---|---|
| Size | 33.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
90f3d530ba48a418fafc5b3dd0bd1c882dc77a42bbe6aa69c0780cd4e416b708
|
|
BLAKE2b-256 checksum How to use checksums |
1044c76417ebd5ec9ac024f7f0c3810717f8231ad064b94fe571bb02cd31038e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|