{
"info": {
"author": "Basil Shubin",
"author_email": "basil.shubin@gmail.com",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Framework :: Django",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content"
],
"description": "django-tz-detect\n================\n\nThis app will auto-detect a user's timezone using JavaScript, then\nconfigure Django's timezone localization system accordingly. As a\nresult, dates shown to users will be in their local timezones.\n\nAuthored by `Adam Charnock `_, and some great `contributors `_.\n\n.. image:: https://img.shields.io/pypi/v/django-tz-detect.svg\n :target: https://pypi.python.org/pypi/django-tz-detect/\n\n.. image:: https://img.shields.io/pypi/dm/django-tz-detect.svg\n :target: https://pypi.python.org/pypi/django-tz-detect/\n\n.. image:: https://img.shields.io/github/license/adamcharnock/django-tz-detect.svg\n :target: https://pypi.python.org/pypi/django-tz-detect/\n\n.. image:: https://img.shields.io/travis/adamcharnock/django-tz-detect.svg\n :target: https://travis-ci.org/adamcharnock/django-tz-detect/\n\n.. image:: https://coveralls.io/repos/adamcharnock/django-tz-detect/badge.svg?branch=develop\n :target: https://coveralls.io/r/adamcharnock/django-tz-detect?branch=develop\n\nHow it works\n------------\n\nOn the first page view you should find that ``tz_detect`` places a\npiece of asynchronous JavaScript code into your page using the\ntemplate tag you inserted. The script will obtain the user's GMT\noffset using ``getTimezoneOffset``, and post it back to Django. The\noffset is stored in the user's session and Django's timezone awareness\nis configured in the middleware.\n\nThe JavaScript will not be displayed in future requests.\n\nInstallation\n------------\n\n1. Either checkout ``tz_detect`` from GitHub, or install using pip:\n\n .. code-block:: bash\n\n pip install django-tz-detect\n\n2. Add ``tz_detect`` to your ``INSTALLED_APPS``:\n\n .. code-block:: python\n\n INSTALLED_APPS += (\n 'tz_detect',\n )\n\n3. Be sure you have the ``django.template.context_processors.request`` processor\n \n .. code-block:: python\n\n TEMPLATES = [\n {\n ...\n 'OPTIONS': {\n 'context_processors': [\n ...\n 'django.template.context_processors.request',\n ],\n },\n },\n ]\n\n4. Update your ``urls.py`` file:\n\n .. code-block:: python\n\n urlpatterns += [\n url(r'^tz_detect/', include('tz_detect.urls')),\n ]\n\n5. Add the detection template tag to your site, ideally in your base layout just before the ``