{ "info": { "author": "Mike Fogel", "author_email": "mike@fogel.ca", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Utilities" ], "description": "django-timezone-field\n=====================\n\n.. image:: https://img.shields.io/travis/mfogel/django-timezone-field/develop.svg\n :target: https://travis-ci.org/mfogel/django-timezone-field/\n\n.. image:: https://img.shields.io/coveralls/mfogel/django-timezone-field/develop.svg\n :target: https://coveralls.io/r/mfogel/django-timezone-field/\n\n.. image:: https://img.shields.io/pypi/dm/django-timezone-field.svg\n :target: https://pypi.python.org/pypi/django-timezone-field/\n\nA Django app providing database and form fields for `pytz`__ timezone objects.\n\nExamples\n--------\n\nDatabase Field\n~~~~~~~~~~~~~~\n\n.. code:: python\n\n import pytz\n from django.db import models\n from timezone_field import TimeZoneField\n\n class MyModel(models.Model):\n timezone1 = TimeZoneField(default='Europe/London') # defaults supported\n timezone2 = TimeZoneField()\n timezone3 = TimeZoneField()\n\n my_inst = MyModel(\n timezone1='America/Los_Angeles', # assignment of a string\n timezone2=pytz.timezone('Turkey'), # assignment of a pytz.DstTzInfo\n timezone3=pytz.UTC, # assignment of pytz.UTC singleton\n )\n my_inst.full_clean() # validates against pytz.common_timezones\n my_inst.save() # values stored in DB as strings\n\n tz = my_inst.timezone1 # values retrieved as pytz objects\n repr(tz) # \"\"\n\n\nForm Field\n~~~~~~~~~~\n\n.. code:: python\n\n from django import forms\n from timezone_field import TimeZoneFormField\n\n class MyForm(forms.Form):\n timezone = TimeZoneFormField()\n\n my_form = MyForm({\n 'timezone': 'America/Los_Angeles',\n })\n my_form.full_clean() # validates against pytz.common_timezones\n\n tz = my_form.cleaned_data['timezone'] # values retrieved as pytz objects\n repr(tz) # \"\"\n\n\nInstallation\n------------\n\n#. From `pypi`__ using `pip`__:\n\n .. code:: sh\n\n pip install django-timezone-field\n\n#. Add `timezone_field` to your `settings.INSTALLED_APPS`__:\n\n .. code:: python\n\n INSTALLED_APPS = (\n ...\n 'timezone_field',\n ...\n )\n\nChangelog\n------------\n\n* 2.0 (2016-01-31)\n\n * Drop support for django 1.7, add support for django 1.9\n * Drop support for python 3.2, 3.3, add support for python 3.5\n * Remove tests from source distribution\n\n* 1.3 (2015-10-12)\n\n * Drop support for django 1.6, add support for django 1.8\n * Various `bug fixes`__\n\n* 1.2 (2015-02-05)\n\n * For form field, changed default list of accepted timezones from\n `pytz.all_timezones` to `pytz.common_timezones`, to match DB field\n behavior.\n\n* 1.1 (2014-10-05)\n\n * Django 1.7 compatibility\n * Added support for formating `choices` kwarg as `[[, ], ...]`,\n in addition to previous format of `[[, ], ...]`.\n * Changed default list of accepted timezones from `pytz.all_timezones` to\n `pytz.common_timezones`. If you have timezones in your DB that are in\n `pytz.all_timezones` but not in `pytz.common_timezones`, this is a\n backward-incompatible change. Old behavior can be restored by\n specifying `choices=[(tz, tz) for tz in pytz.all_timezones]` in your\n model definition.\n\n* 1.0 (2013-08-04)\n\n * Initial release as `timezone_field`.\n\n\nRunning the Tests\n-----------------\n\n#. Install `tox`__.\n\n#. From the repository root, run\n\n .. code:: sh\n\n tox\n\n Postgres will need to be running locally, and sqlite will need to be\n installed in order for tox to do its job.\n\nFound a Bug?\n------------\n\nTo file a bug or submit a patch, please head over to `django-timezone-field on github`__.\n\nCredits\n-------\n\nOriginally adapted from `Brian Rosner's django-timezones`__. The full list of contributors is available on `github`__.\n\n\n__ http://pypi.python.org/pypi/pytz/\n__ http://pypi.python.org/pypi/django-timezone-field/\n__ http://www.pip-installer.org/\n__ https://docs.djangoproject.com/en/dev/ref/settings/#installed-apps\n__ https://github.com/mfogel/django-timezone-field/issues?q=milestone%3A1.3\n__ https://tox.readthedocs.org/\n__ https://github.com/mfogel/django-timezone-field/\n__ https://github.com/brosner/django-timezones/\n__ https://github.com/mfogel/django-timezone-field/graphs/contributors\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/mfogel/django-timezone-field/", "keywords": "", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "ambition-django-timezone-field", "package_url": "https://pypi.org/project/ambition-django-timezone-field/", "platform": "", "project_url": "https://pypi.org/project/ambition-django-timezone-field/", "project_urls": { "Homepage": "http://github.com/mfogel/django-timezone-field/" }, "release_url": "https://pypi.org/project/ambition-django-timezone-field/2.0.3/", "requires_dist": [ "Django (>=1.11)", "pytz" ], "requires_python": "", "summary": "A Django app providing database and form fields for pytz timezone objects.", "version": "2.0.3" }, "last_serial": 4586812, "releases": { "2.0.1": [ { "comment_text": "", "digests": { "md5": "b8b60fa1596400b610535265796b18ab", "sha256": "0946e78fa2391c228057d0b0f19258260708980ca1917fbf7c858971bbaabae3" }, "downloads": -1, "filename": "ambition_django_timezone_field-2.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b8b60fa1596400b610535265796b18ab", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8862, "upload_time": "2017-10-03T16:22:35", "url": "https://files.pythonhosted.org/packages/b1/ca/334f4dd6822ba000c2a7146c2e9927bf5137c2863701f3af7a88c9beb854/ambition_django_timezone_field-2.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7a3d9b0383cc96d37726d40db5d83835", "sha256": "80278173619ab174bf07d917789b2f271333900bcdb5e5b23b8a7380b50f3af4" }, "downloads": -1, "filename": "ambition-django-timezone-field-2.0.1.tar.gz", "has_sig": false, "md5_digest": "7a3d9b0383cc96d37726d40db5d83835", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6508, "upload_time": "2017-10-03T16:22:36", "url": "https://files.pythonhosted.org/packages/fa/1c/5edb8377b5a378576497bc211a68f94ceabed51400fa1c6f2dc1d2c08586/ambition-django-timezone-field-2.0.1.tar.gz" } ], "2.0.2": [ { "comment_text": "", "digests": { "md5": "9ae654127d6e0155cb280a4678245b99", "sha256": "4ecbb2d6b03238726a9b53cf304a1d9d8cfe18f065de1322d932aee541da3c01" }, "downloads": -1, "filename": "ambition_django_timezone_field-2.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "9ae654127d6e0155cb280a4678245b99", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8837, "upload_time": "2017-12-08T23:21:22", "url": "https://files.pythonhosted.org/packages/af/6c/735a074f0d2857abf2fcc5f9a1e0d01f943c6d6d1b9dfc0cd8718d0e8391/ambition_django_timezone_field-2.0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0d076ee73df999aa0cdd25eb44b63146", "sha256": "63e58f9df4a6042abb2e7058b7918a8d23c90bc851db3c74d3687e409f0fc985" }, "downloads": -1, "filename": "ambition-django-timezone-field-2.0.2.tar.gz", "has_sig": false, "md5_digest": "0d076ee73df999aa0cdd25eb44b63146", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6500, "upload_time": "2017-12-08T23:21:23", "url": "https://files.pythonhosted.org/packages/2c/c1/8f0dc1e294f96258e05965a6f94c17d7af781ad0051eced6157cecadeed3/ambition-django-timezone-field-2.0.2.tar.gz" } ], "2.0.3": [ { "comment_text": "", "digests": { "md5": "ee58e6f37294a7457565b1895f5c3dc4", "sha256": "1d7d3ad4096b10efb4ef0e0c180f9c0cbc006855abb3240a1d2c8df5a6eab176" }, "downloads": -1, "filename": "ambition_django_timezone_field-2.0.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ee58e6f37294a7457565b1895f5c3dc4", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6284, "upload_time": "2018-12-11T19:08:32", "url": "https://files.pythonhosted.org/packages/85/1c/31fe04e47dba9822af37ac58f557582cc110a951b19822cd2ad24ec8ba2e/ambition_django_timezone_field-2.0.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e574faa71c58f114ed08fb3ea545fc2a", "sha256": "c3fb03ac026057051de4bc2c4862c7913e679024432f59d093c4203ae3835649" }, "downloads": -1, "filename": "ambition-django-timezone-field-2.0.3.tar.gz", "has_sig": false, "md5_digest": "e574faa71c58f114ed08fb3ea545fc2a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6673, "upload_time": "2018-12-11T19:08:33", "url": "https://files.pythonhosted.org/packages/06/67/38eaf7b9281ff06a9ce921ff4b4d87ad7e86603f92b25b11cfa8ce431b69/ambition-django-timezone-field-2.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ee58e6f37294a7457565b1895f5c3dc4", "sha256": "1d7d3ad4096b10efb4ef0e0c180f9c0cbc006855abb3240a1d2c8df5a6eab176" }, "downloads": -1, "filename": "ambition_django_timezone_field-2.0.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ee58e6f37294a7457565b1895f5c3dc4", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6284, "upload_time": "2018-12-11T19:08:32", "url": "https://files.pythonhosted.org/packages/85/1c/31fe04e47dba9822af37ac58f557582cc110a951b19822cd2ad24ec8ba2e/ambition_django_timezone_field-2.0.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e574faa71c58f114ed08fb3ea545fc2a", "sha256": "c3fb03ac026057051de4bc2c4862c7913e679024432f59d093c4203ae3835649" }, "downloads": -1, "filename": "ambition-django-timezone-field-2.0.3.tar.gz", "has_sig": false, "md5_digest": "e574faa71c58f114ed08fb3ea545fc2a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6673, "upload_time": "2018-12-11T19:08:33", "url": "https://files.pythonhosted.org/packages/06/67/38eaf7b9281ff06a9ce921ff4b4d87ad7e86603f92b25b11cfa8ce431b69/ambition-django-timezone-field-2.0.3.tar.gz" } ] }