{ "info": { "author": "IP2Location", "author_email": "support@ip2location.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "Framework :: Django :: 1.11", "Framework :: Django :: 2.2", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "# Django IP2Location Timezone\r\n\r\nDjango IP2Location Timezone is a Django package that can help you easily display your website visitor the time according to their location. This package used **[IP2Location Web Service](https://www.ip2location.com/web-service/ip2location)** to get time zone information. \r\n\r\n## Requirements\r\n\r\n1. Python 2.7 and above.\r\n2. Django 1.11 and above.\r\n3. **[IP2Location Web Service](https://www.ip2location.com/web-service/ip2location)** API Key. You can get a trial API key from [IP2Location](https://www.ip2location.com/register?id=1005). \r\n\r\n## Quick Start\r\n\r\n1. Install this package by using PYPI: \r\n\t```bash\r\n\tpip install django-ip2location-timezone\r\n\t```\r\n\r\n2. Add \"*ip2location_timezone*\" to your INSTALLED_APPS setting in settings.py:\r\n\t```python\r\n INSTALLED_APPS = (\r\n ...\r\n 'ip2location_timezone',\r\n )\r\n ```\r\n\r\n1. Add \"*IP2locationTimezoneMiddleware*\" to your MIDDLEWARE_CLASSES in settings.py:\r\n\t```python\r\n\tMIDDLEWARE_CLASSES = (\r\n ...\r\n 'ip2location_timezone.middleware.IP2locationTimezoneMiddleware',\r\n )\r\n ```\r\n\r\n4. Add your **[IP2Location Web Service](https://www.ip2location.com/web-service/ip2location)** API Key in settings.py:\r\n\t```python\r\n\tIP2LOCATION_API_KEY = 'YOUR_API_KEY'\r\n ```\r\n\r\n5. In your template, add the following code to display the user time zone and current time:\r\n\t```python\r\n\t{% load tz %}\r\n\t{% localtime on %}\r\n\t\t{% get_current_timezone as TIME_ZONE %}\r\n\t\tYour timezone is {{ TIME_ZONE }}.

\r\n\t\tIt is {% now \"DATETIME_FORMAT\" %}\r\n\t{% endlocaltime %}\r\n\t```\r\n\r\n\r\n## Support\r\n\r\nEmail: [support@ip2location.com](mailto:support@ip2location.com).\r\n\r\nURL: [https://www.ip2location.com](https://www.ip2location.com/)\r\n\r\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ip2location/django-ip2location-timezone", "keywords": "", "license": "MIT License", "maintainer": "", "maintainer_email": "", "name": "django-ip2location-timezone", "package_url": "https://pypi.org/project/django-ip2location-timezone/", "platform": "", "project_url": "https://pypi.org/project/django-ip2location-timezone/", "project_urls": { "Homepage": "https://github.com/ip2location/django-ip2location-timezone" }, "release_url": "https://pypi.org/project/django-ip2location-timezone/1.0.0/", "requires_dist": null, "requires_python": "", "summary": "Django IP2Location Timezone is a simple Django package that can help you easily display your website visitor the time according to their location.", "version": "1.0.0" }, "last_serial": 5520779, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "3f2bd90585710efd5c8365255113f9cf", "sha256": "082bc9b1c1abf5756573d3928939a1b0a79dba02861c6d74d092e2bbb019ed50" }, "downloads": -1, "filename": "django_ip2location_timezone-1.0.0-py2-none-any.whl", "has_sig": false, "md5_digest": "3f2bd90585710efd5c8365255113f9cf", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 4941, "upload_time": "2019-07-12T00:09:12", "url": "https://files.pythonhosted.org/packages/82/01/5e243f400cbbe27e1c1a5fb31fc61c66ec9f5c424683ec4f2de359c0580c/django_ip2location_timezone-1.0.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f447ede256ee0d546d409c1f7f39ebc9", "sha256": "a9c90128356f7d3fc55ae45126d28d6f5c95abb8e39d0f83c4ed20e936720212" }, "downloads": -1, "filename": "django-ip2location-timezone-1.0.0.tar.gz", "has_sig": false, "md5_digest": "f447ede256ee0d546d409c1f7f39ebc9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3838, "upload_time": "2019-07-12T00:09:14", "url": "https://files.pythonhosted.org/packages/a5/9d/0730f1d5587ed82f598d304751083d97fe1fac7f6f7624e192a3862e6ccb/django-ip2location-timezone-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3f2bd90585710efd5c8365255113f9cf", "sha256": "082bc9b1c1abf5756573d3928939a1b0a79dba02861c6d74d092e2bbb019ed50" }, "downloads": -1, "filename": "django_ip2location_timezone-1.0.0-py2-none-any.whl", "has_sig": false, "md5_digest": "3f2bd90585710efd5c8365255113f9cf", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 4941, "upload_time": "2019-07-12T00:09:12", "url": "https://files.pythonhosted.org/packages/82/01/5e243f400cbbe27e1c1a5fb31fc61c66ec9f5c424683ec4f2de359c0580c/django_ip2location_timezone-1.0.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f447ede256ee0d546d409c1f7f39ebc9", "sha256": "a9c90128356f7d3fc55ae45126d28d6f5c95abb8e39d0f83c4ed20e936720212" }, "downloads": -1, "filename": "django-ip2location-timezone-1.0.0.tar.gz", "has_sig": false, "md5_digest": "f447ede256ee0d546d409c1f7f39ebc9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3838, "upload_time": "2019-07-12T00:09:14", "url": "https://files.pythonhosted.org/packages/a5/9d/0730f1d5587ed82f598d304751083d97fe1fac7f6f7624e192a3862e6ccb/django-ip2location-timezone-1.0.0.tar.gz" } ] }