{ "info": { "author": "Nguy\u1ec5n H\u1ed3ng Qu\u00e2n", "author_email": "ng.hong.quan@gmail.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "======================\nDjango Static Revision\n======================\n\n\nProvide a context variable to retrieve the version of a Django application.\n\nThis variable is meant to change the URL of a static file, to invalidate browser cache.\n\n\nInstall\n-------\n\n.. code-block:: shell\n\n pip3 install dj-static-revision\n\n`Django Static Revision` only supports Python 3.4+.\n\n\nUsage\n-----\n\nAdd ``dj_static_revision.context_processors.static_revision`` to your ``context_processors`` list.\n\n.. code-block:: python\n\n TEMPLATES = (\n {\n 'NAME': 'jinja2',\n 'BACKEND': 'django_jinja.backend.Jinja2',\n 'OPTIONS': {\n 'context_processors': (\n # Other context processors\n 'dj_static_revision.context_processors.static_revision',\n ),\n\nA variable ``REVISION`` will then exists in your template, you can use it to append to static file URL.\n\n.. code-block:: jinja\n\n \n\n\n`Django Static Revision` retrieves revision string from Git history.\nIf your source code is not managed by Git, the revision info will be read from a file named `.version` placed next to `manage.py` file.\n\n\nSettings\n--------\n\nThe revision string will be truncated to 10 characters. You can change that by add to Django settings:\n\n.. code-block:: python\n\n STATIC_REVISION_STRING_LENGTH = 10\n\nYou can also change the file for `Django Static Revision` to read revision string from, by add this setting:\n\n.. code-block:: python\n\n STATIC_REVISION_VERSION_FILE = '.version'\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://bitbucket.org/hongquan/dj-static-revision/", "keywords": "django,static,version,cache", "license": "Apache-2.0", "maintainer": "Nguy\u1ec5n H\u1ed3ng Qu\u00e2n", "maintainer_email": "ng.hong.quan@gmail.com", "name": "dj-static-revision", "package_url": "https://pypi.org/project/dj-static-revision/", "platform": "", "project_url": "https://pypi.org/project/dj-static-revision/", "project_urls": { "Homepage": "https://bitbucket.org/hongquan/dj-static-revision/", "Repository": "https://bitbucket.org/hongquan/dj-static-revision.git" }, "release_url": "https://pypi.org/project/dj-static-revision/0.1.4/", "requires_dist": [ "dulwich (>=0.19.11,<0.20.0)", "Django (>=2.0,<3.0)" ], "requires_python": ">=3.5,<4.0", "summary": "Revision info for Django static file", "version": "0.1.4" }, "last_serial": 4848954, "releases": { "0.1.2": [ { "comment_text": "", "digests": { "md5": "0c2ce2c2893996b12af9ace6d840228f", "sha256": "981c8e930ac2db5d137800529b95607d6f3061547fd15a7d700348c4988b13bd" }, "downloads": -1, "filename": "dj_static_revision-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "0c2ce2c2893996b12af9ace6d840228f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.4,<4.0", "size": 3810, "upload_time": "2019-02-19T07:13:31", "url": "https://files.pythonhosted.org/packages/21/75/1a82404a85d1753732c577f40f742123c5ea20f575b62a2387e94adf934b/dj_static_revision-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b272de4251db39a1b4cf67f46946ba0d", "sha256": "31848595736b22a0feb17c4e59f818b3200f0bf6c9bbfff2cf6a8a8a66022199" }, "downloads": -1, "filename": "dj-static-revision-0.1.2.tar.gz", "has_sig": false, "md5_digest": "b272de4251db39a1b4cf67f46946ba0d", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4,<4.0", "size": 2669, "upload_time": "2019-02-19T07:13:28", "url": "https://files.pythonhosted.org/packages/26/d7/d4d9827b453e4e6eec6ec3dd5a4527c5b419dee019ddb489dbc93c1ea182/dj-static-revision-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "5a745ca1e3e2f0e4fd710faa5162e48c", "sha256": "79232e5bb343cedaabd76b006220b3420f53d4998f23eda6c10dcfa8eb55ab2d" }, "downloads": -1, "filename": "dj_static_revision-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "5a745ca1e3e2f0e4fd710faa5162e48c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.4,<4.0", "size": 3810, "upload_time": "2019-02-19T07:30:55", "url": "https://files.pythonhosted.org/packages/74/a1/5cbfb4a44c97d08ae0d571244ad01fe46b071bd75c9eccf5470168bf089e/dj_static_revision-0.1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8b27ccec941578260a35d911fd8d8b51", "sha256": "6da15082eb56d95289694060b9a0214c4e21bbef73f9cb7433a26ba979dd7200" }, "downloads": -1, "filename": "dj-static-revision-0.1.3.tar.gz", "has_sig": false, "md5_digest": "8b27ccec941578260a35d911fd8d8b51", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4,<4.0", "size": 2667, "upload_time": "2019-02-19T07:30:53", "url": "https://files.pythonhosted.org/packages/87/8b/f0bdaa013eda9d0674e6075fb8220720c5038fc99cd78bff28aafd180f3c/dj-static-revision-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "761009f487ab8307f74dbe63eab01ae9", "sha256": "b48c3d8e22f11fce1ba195184c2a5fe875fbf8e66e313b47060c9acbb2e800b2" }, "downloads": -1, "filename": "dj_static_revision-0.1.4-py3-none-any.whl", "has_sig": false, "md5_digest": "761009f487ab8307f74dbe63eab01ae9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5,<4.0", "size": 4080, "upload_time": "2019-02-21T07:24:09", "url": "https://files.pythonhosted.org/packages/ab/8f/75d2e4ff43cc7dee67eaf557db46f2cb4995b99c427e146f0046490fc155/dj_static_revision-0.1.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7a2682bc62f43a5c38ce166e3d3f9a17", "sha256": "4da94cbb7f3fa75ac907d8e1e5dc3e6d0ed2c84b5c976c71e5848959ed6abe16" }, "downloads": -1, "filename": "dj-static-revision-0.1.4.tar.gz", "has_sig": false, "md5_digest": "7a2682bc62f43a5c38ce166e3d3f9a17", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5,<4.0", "size": 2886, "upload_time": "2019-02-21T07:24:07", "url": "https://files.pythonhosted.org/packages/99/ae/b3586fbdb9b2fe582d642239d9a10d9a501f29d91e8ad5903261783034cc/dj-static-revision-0.1.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "761009f487ab8307f74dbe63eab01ae9", "sha256": "b48c3d8e22f11fce1ba195184c2a5fe875fbf8e66e313b47060c9acbb2e800b2" }, "downloads": -1, "filename": "dj_static_revision-0.1.4-py3-none-any.whl", "has_sig": false, "md5_digest": "761009f487ab8307f74dbe63eab01ae9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5,<4.0", "size": 4080, "upload_time": "2019-02-21T07:24:09", "url": "https://files.pythonhosted.org/packages/ab/8f/75d2e4ff43cc7dee67eaf557db46f2cb4995b99c427e146f0046490fc155/dj_static_revision-0.1.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7a2682bc62f43a5c38ce166e3d3f9a17", "sha256": "4da94cbb7f3fa75ac907d8e1e5dc3e6d0ed2c84b5c976c71e5848959ed6abe16" }, "downloads": -1, "filename": "dj-static-revision-0.1.4.tar.gz", "has_sig": false, "md5_digest": "7a2682bc62f43a5c38ce166e3d3f9a17", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5,<4.0", "size": 2886, "upload_time": "2019-02-21T07:24:07", "url": "https://files.pythonhosted.org/packages/99/ae/b3586fbdb9b2fe582d642239d9a10d9a501f29d91e8ad5903261783034cc/dj-static-revision-0.1.4.tar.gz" } ] }