{ "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 ```` tag:\n\n .. code-block:: html+django\n\n {% load tz_detect %}\n {% tz_detect %}\n\n6. Add ``TimezoneMiddleware`` to ``MIDDLEWARE``:\n\n .. code-block:: python\n\n import django\n\n MIDDLEWARE += (\n 'tz_detect.middleware.TimezoneMiddleware',\n )\n\n if django.VERSION < (1, 10):\n MIDDLEWARE_CLASSES += (\n 'tz_detect.middleware.TimezoneMiddleware',\n )\n\n7. (Optional) Configure the countries in which your app will be most commonly used:\n\n .. code-block:: python\n\n # These countries will be prioritized in the search\n # for a matching timezone. Consider putting your\n # app's most popular countries first.\n # Defaults to the top Internet using countries.\n TZ_DETECT_COUNTRIES = ('CN', 'US', 'IN', 'JP', 'BR', 'RU', 'DE', 'FR', 'GB')\n\nPlease see ``example`` application. This application is used to manually\ntest the functionalities of this package. This also serves as a good\nexample.\n\nYou need only Django 1.8 or above to run that. It might run on older\nversions but that is not tested.\n\nCaveats\n-------\n\n- Django's timezone awareness will not be available on the first page view\n- This method requires JavaScript\n- Timezone detection is done entirely from the user's GMT offset, not from their location\n\nFuture expansion\n----------------\n\n- A hook to allow the timezone to be stored against a user\n- Allow timezones to be manually specified\n- Improve timezone detection\n- Optionally using HTML5's location API for better timezone determination\n", "description_content_type": "", "docs_url": null, "download_url": "https://github.com/adamcharnock/django-tz-detect/zipball/master", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/adamcharnock/django-tz-detect", "keywords": "", "license": "MIT License", "maintainer": "", "maintainer_email": "", "name": "django-tz-detect", "package_url": "https://pypi.org/project/django-tz-detect/", "platform": "", "project_url": "https://pypi.org/project/django-tz-detect/", "project_urls": { "Download": "https://github.com/adamcharnock/django-tz-detect/zipball/master", "Homepage": "http://github.com/adamcharnock/django-tz-detect" }, "release_url": "https://pypi.org/project/django-tz-detect/0.2.10/", "requires_dist": null, "requires_python": "", "summary": "Automatic user timezone detection for django", "version": "0.2.10" }, "last_serial": 5006302, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "7310c2678bea6a20809920a6655c0e6e", "sha256": "3d70c1f6336620340442e5a21d7a83e0097a740a41ce3787755ba4fd921b7dd1" }, "downloads": -1, "filename": "django-tz-detect-0.1.0.tar.gz", "has_sig": false, "md5_digest": "7310c2678bea6a20809920a6655c0e6e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5466, "upload_time": "2013-06-19T21:42:30", "url": "https://files.pythonhosted.org/packages/c5/c3/df1ae3938d5791f1f895a8285dd9672c1d4996d85b83743e9426ffe0bc65/django-tz-detect-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "c59e33309cd39134266e31761fdd5e4a", "sha256": "6b8b2e3c8108ffe92f9e839a5e12a24acf26f910dd1cd71afbdd77fe1a1a9650" }, "downloads": -1, "filename": "django-tz-detect-0.1.1.tar.gz", "has_sig": false, "md5_digest": "c59e33309cd39134266e31761fdd5e4a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4788, "upload_time": "2013-06-19T21:47:38", "url": "https://files.pythonhosted.org/packages/15/bc/f550d97b3a4db23e2a77de29411bb499dd45001855da5fa4561a0d44a1d6/django-tz-detect-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "f53983809acdcb2a1163f7001fb56f4d", "sha256": "3b21bb4949dedd4c5f36ba17511de7bc969a41b7190135210c3671068fb1c038" }, "downloads": -1, "filename": "django-tz-detect-0.1.2.tar.gz", "has_sig": false, "md5_digest": "f53983809acdcb2a1163f7001fb56f4d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4804, "upload_time": "2013-06-19T21:56:04", "url": "https://files.pythonhosted.org/packages/c4/43/889dca484fef467a1c2c3f3a3838e1d9c40ae7053a4257cb3d546ca3bc8a/django-tz-detect-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "23ec7ce3398f9210bd7cd1106f12adb4", "sha256": "7c9345e22bfb47eb6230bbf8120b4cf064d62e5f07bff203051f1f7e75c34f0c" }, "downloads": -1, "filename": "django-tz-detect-0.1.3.tar.gz", "has_sig": false, "md5_digest": "23ec7ce3398f9210bd7cd1106f12adb4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4849, "upload_time": "2013-06-19T22:09:40", "url": "https://files.pythonhosted.org/packages/61/22/c6a69990bdfe1ca67080084bb8e289830557d18f44663ccc227120d2fe35/django-tz-detect-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "2d35ed2a920efafcead65c43b98029b5", "sha256": "ba37d76ac8aa134f6212793322250559ed5964146057f6f5613bb69ce9e2ffd1" }, "downloads": -1, "filename": "django-tz-detect-0.1.4.tar.gz", "has_sig": false, "md5_digest": "2d35ed2a920efafcead65c43b98029b5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5883, "upload_time": "2013-06-19T22:40:50", "url": "https://files.pythonhosted.org/packages/c2/ba/16063fa03ea1069d1a8493ad25290d56905238b67734ae3f569f23bf0ac5/django-tz-detect-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "883bc474ace712baaa62006222dd79e7", "sha256": "7ae6eaee19c9a24524e0ed82e04af9814e43824710792235e185a53edb59f8f3" }, "downloads": -1, "filename": "django-tz-detect-0.1.5.tar.gz", "has_sig": false, "md5_digest": "883bc474ace712baaa62006222dd79e7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6042, "upload_time": "2013-06-26T00:43:24", "url": "https://files.pythonhosted.org/packages/1e/de/fd7639a54029413ec9a7dd389d063d290d2266bfb87007754dcc35137d2c/django-tz-detect-0.1.5.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "10d8b530a9c85549de7c9758657aadcf", "sha256": "224b233b0900bc5b905040d422d254be3cec84d3e166e1a70016f81083ffb28b" }, "downloads": -1, "filename": "django-tz-detect-0.2.0.tar.gz", "has_sig": false, "md5_digest": "10d8b530a9c85549de7c9758657aadcf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6808, "upload_time": "2013-08-30T11:30:29", "url": "https://files.pythonhosted.org/packages/4c/35/1236ac6a0f1ba7049889a32e10f986631995f1d70d4f182fb527d970e281/django-tz-detect-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "d35b96181d7e45d3b1984aa7dd73becf", "sha256": "b7bd9ec5ac644e0f045267d60d5e54b861dfbdd6865dab2fbd17f49d557367df" }, "downloads": -1, "filename": "django-tz-detect-0.2.1.tar.gz", "has_sig": false, "md5_digest": "d35b96181d7e45d3b1984aa7dd73becf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6821, "upload_time": "2013-08-30T11:36:38", "url": "https://files.pythonhosted.org/packages/5e/9a/899c59e8a13c1e32c2ef2f034594634fe3c5b7138ef6446bca5327f1d54e/django-tz-detect-0.2.1.tar.gz" } ], "0.2.10": [ { "comment_text": "", "digests": { "md5": "f680d4f68ea0e6d2fd949fbc28a75ee0", "sha256": "88e424bac11cee8433691a481eb6a41560e794b8b1b830e8c202544d9ca138b8" }, "downloads": -1, "filename": "django_tz_detect-0.2.10-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "f680d4f68ea0e6d2fd949fbc28a75ee0", "packagetype": "bdist_wheel", "python_version": "3.7", "requires_python": null, "size": 11750, "upload_time": "2019-03-30T07:43:41", "url": "https://files.pythonhosted.org/packages/28/d8/8634a882588bf0c9495f4c5b834461df4f80561e330d39d43be746f1c7d1/django_tz_detect-0.2.10-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6d4af5cea2872a02f2814f01cc47aa3c", "sha256": "3f23b2198cc4638f72f06f6464a767a0cccd3afd1536c66aed3af531fa6a9926" }, "downloads": -1, "filename": "django-tz-detect-0.2.10.tar.gz", "has_sig": false, "md5_digest": "6d4af5cea2872a02f2814f01cc47aa3c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10810, "upload_time": "2019-03-30T07:43:38", "url": "https://files.pythonhosted.org/packages/05/9b/bbe142278cb75522f763e3a9d7924ca8f9c7090353594f4ca39655546961/django-tz-detect-0.2.10.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "e3746c8214c535461a8f365aa8cbe750", "sha256": "c6ff42649be1e3745343859b8722063f197e76f4f8227fc190c980b85d4e3bf9" }, "downloads": -1, "filename": "django-tz-detect-0.2.2.tar.gz", "has_sig": false, "md5_digest": "e3746c8214c535461a8f365aa8cbe750", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6892, "upload_time": "2013-08-31T02:33:57", "url": "https://files.pythonhosted.org/packages/b9/f0/89d0b123f805740d74ac63ecfdaa42f497b76567c2fea33ad41e1f79af83/django-tz-detect-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "620c51fe47768e936abb542bf8355d9c", "sha256": "2258650cfcab5de0f103bbd469b0d6e10630dd45b67573315362d0d982edeec8" }, "downloads": -1, "filename": "django-tz-detect-0.2.3.tar.gz", "has_sig": true, "md5_digest": "620c51fe47768e936abb542bf8355d9c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7970, "upload_time": "2015-05-27T15:18:44", "url": "https://files.pythonhosted.org/packages/34/d7/f1ad6f31812e13a5cf174a87422dac1ac7c422924082f3a0f171c9f73c98/django-tz-detect-0.2.3.tar.gz" } ], "0.2.4": [ { "comment_text": "", "digests": { "md5": "8503c8ff793ed491c9d1bc6734488b81", "sha256": "25bb60fd1724adbb466ed4581eed4bfc3c163d699772e6fddd3c315c29581932" }, "downloads": -1, "filename": "django-tz-detect-0.2.4.tar.gz", "has_sig": true, "md5_digest": "8503c8ff793ed491c9d1bc6734488b81", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8597, "upload_time": "2015-06-06T06:58:54", "url": "https://files.pythonhosted.org/packages/e1/ba/aae9946bb772cbaa9d8b3d833fde24918d5d89c65105a457beb3dc75dc35/django-tz-detect-0.2.4.tar.gz" } ], "0.2.5": [ { "comment_text": "", "digests": { "md5": "16c5ebb2af300c9b6fd721c296a67705", "sha256": "a443b2dfd3eb653b585e7a1abe57f7ce3214d70b219a8baa3e018453cf14d91a" }, "downloads": -1, "filename": "django-tz-detect-0.2.5.tar.gz", "has_sig": true, "md5_digest": "16c5ebb2af300c9b6fd721c296a67705", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8652, "upload_time": "2015-08-04T06:55:16", "url": "https://files.pythonhosted.org/packages/0c/29/8e743253f12944d585507ea29ae1f615a85d679f82bca3b4d178bc981048/django-tz-detect-0.2.5.tar.gz" } ], "0.2.6": [ { "comment_text": "", "digests": { "md5": "54b0249e8c72078012e2a136d5066113", "sha256": "e9d2a6fcd4ea1cdef02981c68703b710d37d9d218dcd688e5e70eac9249eef95" }, "downloads": -1, "filename": "django-tz-detect-0.2.6.tar.gz", "has_sig": true, "md5_digest": "54b0249e8c72078012e2a136d5066113", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9178, "upload_time": "2016-02-13T02:58:53", "url": "https://files.pythonhosted.org/packages/c8/ec/dd35f9a87833ff0e2ba85f668253042d1cf0c481f42cf64e22695a8382d0/django-tz-detect-0.2.6.tar.gz" } ], "0.2.7": [ { "comment_text": "", "digests": { "md5": "b632c72e4b36d6e423ad00f6002f37bd", "sha256": "3ab012485cb1871a3f4789fcdda6b50d5cd81d856228bc92d9c86d08b07e5517" }, "downloads": -1, "filename": "django_tz_detect-0.2.7-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "b632c72e4b36d6e423ad00f6002f37bd", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 12925, "upload_time": "2016-04-28T13:33:35", "url": "https://files.pythonhosted.org/packages/6e/3d/5dd87a0a04abd3554cd464fe187cb4016814dd9c0af315934031b0cc0470/django_tz_detect-0.2.7-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "101625df0d29a732c09f97784b45eb3d", "sha256": "1c56247ab605a0ea6296d7ee65274df36641c02e2dccdeec62f2cdf2708422cd" }, "downloads": -1, "filename": "django-tz-detect-0.2.7.tar.gz", "has_sig": true, "md5_digest": "101625df0d29a732c09f97784b45eb3d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9363, "upload_time": "2016-04-28T13:33:23", "url": "https://files.pythonhosted.org/packages/0f/e9/18518040a24c46d683f2bc70e50c74563115a4a45d7018d0cdbd11717826/django-tz-detect-0.2.7.tar.gz" } ], "0.2.8": [ { "comment_text": "", "digests": { "md5": "dc861a4b6ef7028e30ef155936aeae3b", "sha256": "f001e31bd6b5b4da0efd0a17f6365a8154cb4873449db340c1aa37002d3ab549" }, "downloads": -1, "filename": "django_tz_detect-0.2.8-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "dc861a4b6ef7028e30ef155936aeae3b", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 13141, "upload_time": "2016-10-21T04:17:50", "url": "https://files.pythonhosted.org/packages/a8/2b/1715e197c08d506265f457009ebefba133b5b9b88871f9d92a67a0970f4f/django_tz_detect-0.2.8-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "040a06cbcafa49f8df7a873b286f76e7", "sha256": "79f84b09bc6ed21d06329ab1d7cbbb7fa4b7ae707c33b4ebe335e55f52418785" }, "downloads": -1, "filename": "django-tz-detect-0.2.8.tar.gz", "has_sig": true, "md5_digest": "040a06cbcafa49f8df7a873b286f76e7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9657, "upload_time": "2016-10-21T04:17:44", "url": "https://files.pythonhosted.org/packages/54/af/aff56ef4d3c27a9f63e63564bd1de1177c5a926c03a6631887aee6102da8/django-tz-detect-0.2.8.tar.gz" } ], "0.2.9": [ { "comment_text": "", "digests": { "md5": "80b8829cc6e199cc9006acfdba894db3", "sha256": "b49b016bebf0504f4b17a04d723a5aa81bbb0208823807a5d29732ee9d1ea426" }, "downloads": -1, "filename": "django_tz_detect-0.2.9-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "80b8829cc6e199cc9006acfdba894db3", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 13905, "upload_time": "2017-12-18T19:52:35", "url": "https://files.pythonhosted.org/packages/d6/2d/0a7389652490ecbe21f8633cf92ca6d8957f09603b54f174dd2dbe634b36/django_tz_detect-0.2.9-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e2a6956350b6a392859055aa5c320aae", "sha256": "1e69c76fcf811c967caafde64e2030137990dbac86af7bb84559c7bcc9d81764" }, "downloads": -1, "filename": "django-tz-detect-0.2.9.tar.gz", "has_sig": false, "md5_digest": "e2a6956350b6a392859055aa5c320aae", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10288, "upload_time": "2017-12-18T19:52:33", "url": "https://files.pythonhosted.org/packages/25/4b/f12853256a02e9945cb0573eead2012283bbe637826636433a8491245adc/django-tz-detect-0.2.9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f680d4f68ea0e6d2fd949fbc28a75ee0", "sha256": "88e424bac11cee8433691a481eb6a41560e794b8b1b830e8c202544d9ca138b8" }, "downloads": -1, "filename": "django_tz_detect-0.2.10-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "f680d4f68ea0e6d2fd949fbc28a75ee0", "packagetype": "bdist_wheel", "python_version": "3.7", "requires_python": null, "size": 11750, "upload_time": "2019-03-30T07:43:41", "url": "https://files.pythonhosted.org/packages/28/d8/8634a882588bf0c9495f4c5b834461df4f80561e330d39d43be746f1c7d1/django_tz_detect-0.2.10-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6d4af5cea2872a02f2814f01cc47aa3c", "sha256": "3f23b2198cc4638f72f06f6464a767a0cccd3afd1536c66aed3af531fa6a9926" }, "downloads": -1, "filename": "django-tz-detect-0.2.10.tar.gz", "has_sig": false, "md5_digest": "6d4af5cea2872a02f2814f01cc47aa3c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10810, "upload_time": "2019-03-30T07:43:38", "url": "https://files.pythonhosted.org/packages/05/9b/bbe142278cb75522f763e3a9d7924ca8f9c7090353594f4ca39655546961/django-tz-detect-0.2.10.tar.gz" } ] }