Skip to content

davisnando/django-postcode-lookup

 
 

Repository files navigation

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.

About

Generic API for postcode lookups

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 98.5%
  • Makefile 1.5%