{ "info": { "author": "Dani Hodovic", "author_email": "hodovic.dani@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Framework :: Django :: 2.0", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", "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" ], "description": "=============================\nDjango disable cache headers\n=============================\n\nMiddleware that disables caching headers during development in Django.\n\nIn production you will typically a CDN or browser cache to speed up subsequent\nreads of your pages. This ensures reads don't need to hit your DB as often.\n\n.. code-block:: python\n\n from django.views.decorators.cache import cache_control\n\n @method_decorator(cache_control(public=True, max_age=60 * 5)), name=\"dispatch\")\n def my_view(request):\n ...\n\n\nHowever this is annoying during development as you always want to serve fresh\npages and static files on page refresh. Using this middleware in development\nstrips out the cache headers and prevents the browser (or dev cache) from\ncaching your content.\n\nQuickstart\n----------\n\nInstall Django disable cache headers::\n\n pip install django-disable-cache-headers\n\nAdd it to your `INSTALLED_APPS`:\n\n.. code-block:: python\n\n INSTALLED_APPS = (\n ...\n 'disable_cache_headers.apps.DisableCacheHeadersConfig',\n ...\n )\n\nAdd the middleware in your development settings, e.g in config/settings/local.py.\n\n.. code-block:: python\n\n from .base import *\n MIDDLEWARE += [\"disable_cache_headers.middleware.DisableCacheControl\"]\n\nRunning Tests\n-------------\n\n.. code-block:: bash\n\n python -m venv venv\n source ./venv/bin/activate\n pip install -r requirements_test.txt\n pytest\n\n\n\n\n\nHistory\n-------\n\n0.1.0 (2019-08-22)\n++++++++++++++++++\n\n* First release on PyPI.", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/danihodovic/django-disable-cache-headers", "keywords": "django-disable-cache-headers", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "django-disable-cache-headers", "package_url": "https://pypi.org/project/django-disable-cache-headers/", "platform": "", "project_url": "https://pypi.org/project/django-disable-cache-headers/", "project_urls": { "Homepage": "https://github.com/danihodovic/django-disable-cache-headers" }, "release_url": "https://pypi.org/project/django-disable-cache-headers/0.0.1/", "requires_dist": null, "requires_python": "", "summary": "Middleware that disables caching headers in Django", "version": "0.0.1" }, "last_serial": 5715629, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "611bb4c4d7e59e693085b232ac33760b", "sha256": "2b94e3d5ff4a9c2e599454c2ee8cf58e1dc65bd32b2c3e9fbdab83a923b8529e" }, "downloads": -1, "filename": "django-disable-cache-headers-0.0.1.tar.gz", "has_sig": false, "md5_digest": "611bb4c4d7e59e693085b232ac33760b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3824, "upload_time": "2019-08-22T14:44:32", "url": "https://files.pythonhosted.org/packages/1e/66/4a008c28e5e091c9dc24dbec7380f4b599831c727630c6426fc70f147ceb/django-disable-cache-headers-0.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "611bb4c4d7e59e693085b232ac33760b", "sha256": "2b94e3d5ff4a9c2e599454c2ee8cf58e1dc65bd32b2c3e9fbdab83a923b8529e" }, "downloads": -1, "filename": "django-disable-cache-headers-0.0.1.tar.gz", "has_sig": false, "md5_digest": "611bb4c4d7e59e693085b232ac33760b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3824, "upload_time": "2019-08-22T14:44:32", "url": "https://files.pythonhosted.org/packages/1e/66/4a008c28e5e091c9dc24dbec7380f4b599831c727630c6426fc70f147ceb/django-disable-cache-headers-0.0.1.tar.gz" } ] }