Skip to main content

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

Quick start

1 Install using pip:

pip install django-request-position

2 Add “request_position” to your INSTALLED_APPS settings like this:

INSTALLED_APPS += ('request_position',)

3 Add the middleware:

MIDDLEWARE += (
    'request_position.middleware.RequestPositionMiddleware',
)

Settings

  • REQUEST_POSITION_REMOTE_ADDR_ATTR (default: “REMOTE_ADDR”)

  • REQUEST_POSITION_DEFAULT_IP (default: “127.0.0.1”)

  • REQUEST_POSITION_DEFAULT_POSITION (default: None)

  • REQUEST_POSITION_DEFAULT_COUNTRY_CODE (default: None)

  • REQUEST_POSITION_COOKIE_NAME (default: “_request_position”)

  • REQUEST_POSITION_GEO_HEADER (default: “HTTP_GEOLOCATION”)

  • REQUEST_POSITION_OVERRIDE_LATITUDE_PARAM (default “lat”)

  • REQUEST_POSITION_OVERRIDE_LONGITUDE_PARAM (default “lon”)

  • REQUEST_POSITION_OVERRIDE_COUNTRY_CODE_PARAM (default “cc”)

  • REQUEST_POSITION_USE_GIS_POINT (default False)

Metadata

Release files for django-request-position 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-request-position 1.0.0
File Size Uploaded Provenance
django-request-position-1.0.0.tar.gz 5.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for django-request-position 1.0.0
File Interpreter ABI Platform
django_request_position-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 11.0 kB

Release files / django-request-position-1.0.0.tar.gz

Download URL django-request-position-1.0.0.tar.gz
Size 5.1 kB
Tags Source
SHA-256 checksum
How to use checksums
3202f6ff2f13c93e8aa89fc0ae4f3280a9eb5d2f5220990a5d7694acc946b24f
BLAKE2b-256 checksum
How to use checksums
857f7de6b1b6a97f377cd3ae44684204349feb45b8eec8e78f904e7c8d6bf010
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.8.5 Darwin/20.6.0

Release files / django_request_position-1.0.0-py3-none-any.whl

Download URL django_request_position-1.0.0-py3-none-any.whl
Size 5.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
938ead9fa766f7545b60fcc9ababc0686d29c441a06c4670ababe5dcd701651c
BLAKE2b-256 checksum
How to use checksums
561d6277da62851cedd6c856a1dbb641429edcdc2d3c0239f20d9244c00ad82d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.8.5 Darwin/20.6.0

Security for django-request-position 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page