Skip to main content

Django app to add a "position" field to the request, using GeoIP or GPS data given in the request headers

Project description

Django Request Position

Django app to add a "position" field to the request, using GeoIP or GPS data given in the request headers. Some
references about this:

* `A Uniform Resource Identifier for Geographic Locations ('geo' URI) <>`_.
* `HTTP Geolocation draft-thomson-geopriv-http-geolocation-00 <>`_.

Quick start

**1** Install using pip::

pip install django-belt

**2** Add "request_position" to your INSTALLED_APPS settings like this::

INSTALLED_APPS += ('request_position',)

**3** Add the middleware::



* ``REQUEST_POSITION_COOKIE_NAME`` (default: "_request_position")


1.0a13 (2017-12-05)

* Fixed problem with IP from ``HTTP_X_FORWARDED_FOR``

1.0a12 (2017-12-04)

* Fixed error wile providing a IP that does not exists.

1.0a7 (2017-12-04)

* Added ``geoip2`` requirement.

1.0a6 (2017-12-04)

* Support for Django 2.0.

1.0a5 (2017-2-28)

* Fixed settings variables prefix.
* Fixed problem with default REQUEST_POSITION_DEFAULT_COUNTRY_CODE value.
* Added settings variables to README.

1.0a4 (2017-2-28)

* Fixed problem with missing REMOTE_ADDR_ATTR setting variable.

1.0a3 (2017-2-28)

* Fixed problem with missing header.

1.0a2 (2017-2-28)

* Fixed Django 1.10 compatibility with new middleware.

1.0a1 (2017-2-21)

* First release on PyPI.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
django_request_position-1.0a13-py2.py3-none-any.whl (7.4 kB) Copy SHA256 hash SHA256 Wheel py2.py3
django-request-position-1.0a13.tar.gz (5.1 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page