Skip to main content

Django models for storing and retrieving postal addresses.

Project description

django-address-app

Welcome to Django Address

Python Version codecov wemake-python-styleguide Code style: black wemake.services

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 (see pyproject.toml for full version)
  • django with version 3.0

Development

When developing locally, we use:

Alternatives

Project details


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.4.tar.gz (10.0 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page