{ "info": { "author": "Rich Jones", "author_email": "", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "![Timezones. Yuck.](http://i.imgur.com/Qc2W47H.gif)\n\ndjango-easy-timezones-redux [![Build Status](https://travis-ci.org/maurizi/django-easy-timezones.svg)](https://travis-ci.org/maurizi/django-easy-timezones)\n=====================\n\nEasy IP-based timezones for Django (>=1.11) based on MaxMind GeoIP, with IPv6 support.\nUpdated fork of [`django-easy-timezones`](https://github.com/Miserlou/django-easy-timezones) that uses the new version of MaxMind's GeoIP2 database.\n\nQuick start\n-----------\n\n1. Install django-easy-timezones-redux\n\n ```python\n pip install django-easy-timezones-redux\n ```\n\n1. Add \"easy-timezones\" to your INSTALLED_APPS setting like this:\n\n ```python\n INSTALLED_APPS = (\n ...\n 'easy_timezones',\n )\n ```\n\n1. Add EasyTimezoneMiddleware to your MIDDLEWARE\n\n ```python\n MIDDLEWARE = (\n ...\n 'easy_timezones.middleware.EasyTimezoneMiddleware',\n )\n ```\n\n1. Add a path to the [MaxMind GeoLite2 cities databases](https://dev.maxmind.com/geoip/geoip2/geolite2/) in your settings file:\n\n ```python\n GEOIP2_DATABASE = '/path/to/your/geoip/database/GeoLite2-City.mmdb'\n ```\n\n1. Enable localtime in your templates.\n\n ```python\n {% load tz %}\n The UTC time is {{ object.date }}\n {% localtime on %}\n The local time is {{ object.date }}\n {% endlocaltime %}\n ```\n1. That's it!\n\n## Signals\n\nYou can also use signals to perform actions based on the timezone detection.\n\n1. To hook into the Timezone detection event to, say, save it to the request's user somewhere more permanent than a session, do something like this:\n\n\t```python\n\tfrom easy_timezones.signals import detected_timezone\t\n\n\t@receiver(detected_timezone, sender=MyUserModel)\n\tdef process_timezone(sender, instance, timezone, **kwargs):\n \tif instance.timezone != timezone:\n \tinstance.timezone = timezone\n \tinstance.save()\n\t```\n\n\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/maurizi/django-easy-timezones", "keywords": "", "license": "Apache License", "maintainer": "Michael Maurizi", "maintainer_email": "michael@maurizi.org", "name": "django-easy-timezones-redux", "package_url": "https://pypi.org/project/django-easy-timezones-redux/", "platform": "", "project_url": "https://pypi.org/project/django-easy-timezones-redux/", "project_urls": { "Homepage": "https://github.com/maurizi/django-easy-timezones" }, "release_url": "https://pypi.org/project/django-easy-timezones-redux/1.0.4/", "requires_dist": [ "Django (>=1.8)", "geoip2 (>=2.9.0)", "ipaddress (>=1.0.16)", "pytz", "wheel (>=0.29.0)" ], "requires_python": "", "summary": "Easy timezones for Django (>=1.11) based on MaxMind GeoIP2.", "version": "1.0.4" }, "last_serial": 4742541, "releases": { "1.0.3": [ { "comment_text": "", "digests": { "md5": "39617ab223480027ae66f42c0de609ca", "sha256": "61b80e7cb2dca68c22b39c2abdadca2ffb1d0c20d1f2faf2190a5d1048a7d452" }, "downloads": -1, "filename": "django_easy_timezones_redux-1.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "39617ab223480027ae66f42c0de609ca", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11173, "upload_time": "2019-01-25T03:26:05", "url": "https://files.pythonhosted.org/packages/dd/f3/cde4bf28203a85f92dc4e625b2bbe3acc28bb39c22ccbdbaa33900645b18/django_easy_timezones_redux-1.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "65b7876fa0930fab68e32644e704a109", "sha256": "8ae590ba5a640219c989fadef14fb396ead0c46349601d0b248389b0744159fc" }, "downloads": -1, "filename": "django-easy-timezones-redux-1.0.3.tar.gz", "has_sig": false, "md5_digest": "65b7876fa0930fab68e32644e704a109", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9641, "upload_time": "2019-01-25T03:26:06", "url": "https://files.pythonhosted.org/packages/d2/d9/ad922183eedf75ad468fd42acbf901cec61a0f074af49842f76a133a3799/django-easy-timezones-redux-1.0.3.tar.gz" } ], "1.0.4": [ { "comment_text": "", "digests": { "md5": "82d43451f1e1d8c9f86e10fa9cac2936", "sha256": "d44d2ef1ce578fac14eba561dd1771788da7a376e361df241c0a01eae78b4f4b" }, "downloads": -1, "filename": "django_easy_timezones_redux-1.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "82d43451f1e1d8c9f86e10fa9cac2936", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11171, "upload_time": "2019-01-26T02:09:18", "url": "https://files.pythonhosted.org/packages/98/eb/2ad0392c5ceaaaeb9322d232ba5044f92414d00e949157e2816427c96f38/django_easy_timezones_redux-1.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9c54dd2a3634a638a4c2747a646dd257", "sha256": "795c40239b4a260138b6eb3c2b0e3d62fc265f092ab18095b1eef490e7d1850d" }, "downloads": -1, "filename": "django-easy-timezones-redux-1.0.4.tar.gz", "has_sig": false, "md5_digest": "9c54dd2a3634a638a4c2747a646dd257", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9641, "upload_time": "2019-01-26T02:09:20", "url": "https://files.pythonhosted.org/packages/09/fb/2105bbd484b89104578d5cb066cd606a022ff23bdc2b8054ae8dbec92946/django-easy-timezones-redux-1.0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "82d43451f1e1d8c9f86e10fa9cac2936", "sha256": "d44d2ef1ce578fac14eba561dd1771788da7a376e361df241c0a01eae78b4f4b" }, "downloads": -1, "filename": "django_easy_timezones_redux-1.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "82d43451f1e1d8c9f86e10fa9cac2936", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11171, "upload_time": "2019-01-26T02:09:18", "url": "https://files.pythonhosted.org/packages/98/eb/2ad0392c5ceaaaeb9322d232ba5044f92414d00e949157e2816427c96f38/django_easy_timezones_redux-1.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9c54dd2a3634a638a4c2747a646dd257", "sha256": "795c40239b4a260138b6eb3c2b0e3d62fc265f092ab18095b1eef490e7d1850d" }, "downloads": -1, "filename": "django-easy-timezones-redux-1.0.4.tar.gz", "has_sig": false, "md5_digest": "9c54dd2a3634a638a4c2747a646dd257", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9641, "upload_time": "2019-01-26T02:09:20", "url": "https://files.pythonhosted.org/packages/09/fb/2105bbd484b89104578d5cb066cd606a022ff23bdc2b8054ae8dbec92946/django-easy-timezones-redux-1.0.4.tar.gz" } ] }