Skip to main content

Django IP2Location Time Zone

Django IP2Location Time Zone package enables you easily display your website visitor the time baased on their geo location derived from the IP address. This package uses IP2Location Web Service for IP lookup and time zone information.

Requirements

  1. Python 2.7 and above.
  2. Django 1.11 and above.
  3. IP2Location Web Service API Key. You can get a trial API key from IP2Location.com.

Quick Start

  1. Install this package from PyPI:

    pip install django-ip2location-timezone
    
  2. Add "ip2location_timezone" to your INSTALLED_APPS setting in settings.py:

    INSTALLED_APPS = (
      ...
      'ip2location_timezone',
    )
    
  3. Add "IP2locationTimezoneMiddleware" to your MIDDLEWARE_CLASSES in settings.py:

     MIDDLEWARE_CLASSES = (
       ...
       'ip2location_timezone.middleware.IP2locationTimezoneMiddleware',
     )
    
  4. Add your IP2Location Web Service API Key in settings.py:

    IP2LOCATION_API_KEY = 'YOUR_API_KEY'
    
  5. In your template, add the following code to display the user time zone and current time:

    {% load tz %}
    {% localtime on %}
    	{% get_current_timezone as TIME_ZONE %}
    	Your timezone is {{ TIME_ZONE }}.<br/><br/>
    	It is {% now "DATETIME_FORMAT" %}
    {% endlocaltime %}
    

Support

Email: support@ip2location.com.

URL: https://www.ip2location.com

Metadata

Release files for django-ip2location-timezone 1.0.1

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-ip2location-timezone 1.0.1
File Size Uploaded Provenance Actions
django_ip2location_timezone-1.0.1.tar.gz 4.3 kB Without provenance Details for django_ip2location_timezone-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-ip2location-timezone 1.0.1
File Interpreter ABI Platform Actions
django_ip2location_timezone-1.0.1-py3-none-any.whl Python 3 none any Details for django_ip2location_timezone-1.0.1-py3-none-any.whl

Total release size: 9.4 kB

Release files / django_ip2location_timezone-1.0.1.tar.gz

Download URL django_ip2location_timezone-1.0.1.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
5be9b5a6b8f9b46d439b31d4a67c14ac0c94746507c32e32f5d92b03c7ebc47c
BLAKE2b-256 checksum
How to use checksums
38ab0eaedc41246cbf359edcbd3bea73f28e522c5707f41d3314a6f0d7962370
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Release files / django_ip2location_timezone-1.0.1-py3-none-any.whl

Download URL django_ip2location_timezone-1.0.1-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e492558b48efc50cff8baf424678dd3324d9bc17a76386fcf2c8aae80e322ea2
BLAKE2b-256 checksum
How to use checksums
47c4a51995155da4c020d0a4d4b4225198235c15c0f503a2164344088da3fd8c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Security for django-ip2location-timezone 1.0.1

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