{ "info": { "author": "Andrew Cordery", "author_email": "cordery@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "Django Conditional Views\n########################\n\n.. image:: https://circleci.com/gh/cordery/django-conditional-views.svg?style=svg\n :target: https://circleci.com/gh/cordery/django-conditional-views\n :alt: Build Status\n\n\n.. image:: https://codecov.io/gh/cordery/django-conditional-views/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/cordery/django-conditional-views\n :alt: Test Coverage\n\n\n.. image:: https://readthedocs.org/projects/django-conditional-views/badge/?version=latest\n :target: https://django-conditional-views.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n\n\n.. image:: https://img.shields.io/github/license/cordery/django-conditional-views.svg\n :alt: MIT License\n\n\nSimple ETag and Last-Modified mixins for class based views.\n\n\nWhat is Django Conditional Views?\n==================================\n\nDjango Conditional Views builds off of the built in `django conditional view processing`_ machinery\nto provide simple mixins for class based views that implement support for the ETag and Last-Modified\nconditional request headers.\n\n.. _django conditional view processing: https://docs.djangoproject.com/en/2.1/topics/conditional-view-processing/\n\n\nFeatures\n========\n\nInherit one of these mixins to make your TemplateView's, DetailView's, or ListView's:\n\n 1. Calculate and append ETag and/or Last-Modified headers to the response and;\n\n 2. Respond with a `304 Not Modified`_ or a `412 Precondition Failed`_ to requests that provide conditional response headers such as If-Modified-Since\n\n.. _304 Not Modified: https://tools.ietf.org/html/rfc7232#section-4.1\n.. _412 Precondition Failed: https://tools.ietf.org/html/rfc7232#section-4.2\n\n**Helpful Defaults**\n * ETags are automatically generated from the response.content.\n * ETag generation can be customized both before and after the response is rendered.\n * The Last Modified header is automatically set from the last modified timestamp of the template.\n * In the case of the DetailView and ListView mixins, the Last Modified header may also be\n configured to get the last modification timestamp from a field on the model, in which case\n the lastest of that or the template's last modified timestamp will be used.\n\n\n\nGetting Started\n===============\n\n\nFirst install django-conditional-views\n\n.. code-block:: bash\n\n $ pip install django-conditional-views\n\nThen inherit from one of the following mixins in your views:\n\n* ConditionalGetMixin - Inherits from View\n* ConditionalGetTemplateViewMixin - Inherits from TemplateView\n* ConditionalGetListViewMixin - Inherits from ListView\n* ConditionalGetDetailViewMixin - Inherits from DetailView\n\nSee the Usage_ and API_ sections of the documentation_ for more details.\n\n.. _Usage: https://django-conditional-views.readthedocs.io/en/latest/usage.html\n.. _API: https://django-conditional-views.readthedocs.io/en/latest/api.html\n.. _documentation: https://django-conditional-views.readthedocs.io/en/latest/\n\nContributing\n============\n\nContributions are welcome.\n\n\nGetting Started\n---------------\n\nTo work on the Pendulum codebase, you'll want to clone the project locally\nand install the required dependencies via `poetry `_.\n\n.. code-block:: bash\n\n $ git clone git@github.com:cordery/django-conditional-views.git\n $ poetry develop\n\n\nRunning Tests\n---------------\ndjango-conditional-views uses pytest. To run tests:\n\n.. code-block:: bash\n\n $ pytest\n\n", "description_content_type": "text/x-rst", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/cordery/django-conditional-views", "keywords": "Django,Last-Modified,http,conditional requests,ETag", "license": "MIT", "maintainer": "Andrew Cordery", "maintainer_email": "cordery@gmail.com", "name": "django-conditional-views", "package_url": "https://pypi.org/project/django-conditional-views/", "platform": "", "project_url": "https://pypi.org/project/django-conditional-views/", "project_urls": { "Homepage": "https://github.com/cordery/django-conditional-views" }, "release_url": "https://pypi.org/project/django-conditional-views/0.1.3/", "requires_dist": [ "sphinx-autodoc-typehints (>=1.3,<2.0); extra == \"docs\"", "sphinx (>=1.7,<2.0); extra == \"docs\"", "django (>=2.1,<3.0)" ], "requires_python": ">=3.6,<4.0", "summary": "Simple Etag and Last-Modified mixins for class based views.", "version": "0.1.3" }, "last_serial": 4246315, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "72b68358ddf606584a481147aa30dee2", "sha256": "50d27363102f09b42513325f7760fce13054df46bc58ffbb8a121c2c2c4d5d66" }, "downloads": -1, "filename": "django_conditional_views-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "72b68358ddf606584a481147aa30dee2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<4.0", "size": 20389, "upload_time": "2018-09-06T20:35:49", "url": "https://files.pythonhosted.org/packages/14/f2/5d9092a54853f0cb0b4e464b256138c465dff12b84cab5a1b5fa4595fb34/django_conditional_views-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b426cb54882169db8516ad5ecec57191", "sha256": "7ec9d8d09fd07a48b0b2f4a8f7ed6708e0480d84eb7c425930c58fe2a736a3a5" }, "downloads": -1, "filename": "django_conditional_views-0.1.0.tar.gz", "has_sig": false, "md5_digest": "b426cb54882169db8516ad5ecec57191", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<4.0", "size": 5820, "upload_time": "2018-09-06T20:35:50", "url": "https://files.pythonhosted.org/packages/8f/d7/043635a37e2b914a7c2274611c6b365ed67c15505bbb843026d179bcc318/django_conditional_views-0.1.0.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "3d6fee5f9588b94e1f6c05ebd434b7df", "sha256": "7776e1a2fbf243d2ef89622c7b0faffd05d115ff88ef69ac13026c4b929fc51e" }, "downloads": -1, "filename": "django_conditional_views-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "3d6fee5f9588b94e1f6c05ebd434b7df", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<4.0", "size": 20390, "upload_time": "2018-09-06T21:03:26", "url": "https://files.pythonhosted.org/packages/ca/1b/b8f04341d57eb12c2a328661f305b32f53e831d4daac3a033f5abea452da/django_conditional_views-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f5f9fd13d896a131f1169f7bed2acbcd", "sha256": "e89413d282a08860547e0394f7ac9c4c2a0a1902a020edf087cb2d6ea288900e" }, "downloads": -1, "filename": "django_conditional_views-0.1.2.tar.gz", "has_sig": false, "md5_digest": "f5f9fd13d896a131f1169f7bed2acbcd", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<4.0", "size": 5821, "upload_time": "2018-09-06T21:03:27", "url": "https://files.pythonhosted.org/packages/ea/84/8c5f1f004126a96d7a012107e1247dbff5dcedb6768b91520775befe8b65/django_conditional_views-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "d3c840fff790227d17cb030e2d095740", "sha256": "296d4a98446d98c48cd2c64e4378ee2584575441180a711c334f7ff908a6f5ed" }, "downloads": -1, "filename": "django_conditional_views-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "d3c840fff790227d17cb030e2d095740", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<4.0", "size": 21630, "upload_time": "2018-09-06T21:26:45", "url": "https://files.pythonhosted.org/packages/69/0c/3d8a870095145aaa42128b78ab2641314fae23a1b84f19e1a02cfb451958/django_conditional_views-0.1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e835fbe60d90ea652719183db98e4f0d", "sha256": "bff03fc06ab859a739ce81904d28d3d4355dcdb0420b21c9598212e469775fa4" }, "downloads": -1, "filename": "django_conditional_views-0.1.3.tar.gz", "has_sig": false, "md5_digest": "e835fbe60d90ea652719183db98e4f0d", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<4.0", "size": 8026, "upload_time": "2018-09-06T21:26:46", "url": "https://files.pythonhosted.org/packages/c9/1b/3963850d1f47eb2812189eb7341c88455f59295956edc75b1fdd394d5623/django_conditional_views-0.1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d3c840fff790227d17cb030e2d095740", "sha256": "296d4a98446d98c48cd2c64e4378ee2584575441180a711c334f7ff908a6f5ed" }, "downloads": -1, "filename": "django_conditional_views-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "d3c840fff790227d17cb030e2d095740", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<4.0", "size": 21630, "upload_time": "2018-09-06T21:26:45", "url": "https://files.pythonhosted.org/packages/69/0c/3d8a870095145aaa42128b78ab2641314fae23a1b84f19e1a02cfb451958/django_conditional_views-0.1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e835fbe60d90ea652719183db98e4f0d", "sha256": "bff03fc06ab859a739ce81904d28d3d4355dcdb0420b21c9598212e469775fa4" }, "downloads": -1, "filename": "django_conditional_views-0.1.3.tar.gz", "has_sig": false, "md5_digest": "e835fbe60d90ea652719183db98e4f0d", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<4.0", "size": 8026, "upload_time": "2018-09-06T21:26:46", "url": "https://files.pythonhosted.org/packages/c9/1b/3963850d1f47eb2812189eb7341c88455f59295956edc75b1fdd394d5623/django_conditional_views-0.1.3.tar.gz" } ] }