Django models for storing and retrieving postal addresses.
Project description
django-address-app
Welcome to Django Address
Quickstart
Install
pip install django-address-app
Add them to your INSTALLED_APPS:
INSTALLED_APPS = [
...
'django_address',
...
]
If you want to use your models and don't want to subclass Abstract models, you must inform django_address about your models in settings.py:
# myproject/settings.py
DJANGO_ADDRESS_COUNTRY_MODEL = "my_app.Country"
DJANGO_ADDRESS_REGION_MODEL = "my_app.Region" # or my_app.State, my_app.Province, etc..
DJANGO_ADDRESS_DISTRICT_MODEL = "my_app.District" # or my_app.County
DJANGO_ADDRESS_LOCALITY_MODEL = "my_app.Locality"
DJANGO_ADDRESS_STREET_MODEL = "my_app.Street"
DJANGO_ADDRESS_ADDRESS_MODEL = "my_app.Address"
If you want change behavior processing AddressField, you can use your Service
# myproject/settings.py
DJANGO_ADDRESS_SERVICE_CLASS = "django_address.service.Address"
Prerequisites
You will need:
python3.8
(seepyproject.toml
for full version)django
with version3.0
Development
When developing locally, we use:
editorconfig
plugin (required)pipenv
(required)pycharm 2017+
orvscode
Alternatives
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
django-address-app-0.1.2.tar.gz
(10.0 kB
view hashes)