Skip to content

Latest commit

 

History

History
63 lines (41 loc) · 1.58 KB

README.rst

File metadata and controls

63 lines (41 loc) · 1.58 KB

django-postcode-lookup

Documentation Status

This Django app providers a pluggable postcode django restframework endpoint. It currently only works for postcodes in The Netherlands.

Currently supports the following services:
  • ApiWise
  • Webservices.nl

Status

https://travis-ci.org/LabD/django-postcode-lookup.svg?branch=master http://codecov.io/github/LabD/django-postcode-lookup/coverage.svg?branch=master

Installation

pip install django_postcode_lookup

Usage

Add the following to your urls.py:

url(r'^postcode-lookup/', include('django_postcode_lookup.urls')),

Add a setting with the required backend

POSTCODE_LOOKUP = {
    'default': {
        'backend': 'django_postcode_lookup.backends.Webservices',
        'OPTIONS': {
            'username': 'someuser',
            'password': 'somepassword',
        }
    }
}

To offer some form of protection to the api endpoint for usage by others a valid csrf token is required.