A Django template tag for generating a URL for a static file, with a version string which will be effectively unique based on the contents of the file.
Project description
canonical-webteam.versioned-static
=======================
A ``{% versioned_static %}`` Django template tag for generating a URL for a
static file, with a version string which will be effectively unique
based on the contents of the file.
Example
-------
::
/static/css/global.css?v=a23bd10
Installation
------------
.. code:: python
# settings.py
INSTALLED_APPS += ['django_versioned_static_url']
Usage
-----
The following template code:
.. code:: html
{% load versioned_static %}
<link rel="stylesheet" href="{% versioned_static 'css/global.css' %}" />
Outputs:
.. code:: html
<link rel="stylesheet" href="/static/css/global.css?v=feb0d0e" />
=======================
A ``{% versioned_static %}`` Django template tag for generating a URL for a
static file, with a version string which will be effectively unique
based on the contents of the file.
Example
-------
::
/static/css/global.css?v=a23bd10
Installation
------------
.. code:: python
# settings.py
INSTALLED_APPS += ['django_versioned_static_url']
Usage
-----
The following template code:
.. code:: html
{% load versioned_static %}
<link rel="stylesheet" href="{% versioned_static 'css/global.css' %}" />
Outputs:
.. code:: html
<link rel="stylesheet" href="/static/css/global.css?v=feb0d0e" />
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for canonicalwebteam.versioned-static-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 59c1fe3afaa3fd3979e110ea9375d95540c17af478a2e0f05c411303894c6710 |
|
MD5 | e9d3dd9bbc65920fdffba4922d2de816 |
|
BLAKE2b-256 | c910c2759b2288d400848c5e4291aa57ccee0ce6524fb5082d003ff22c583be4 |