A 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
A {% versioned_static %} 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
# settings.py
INSTALLED_APPS += ['django_versioned_static_url']
Usage
The following template code:
{% load versioned_static %}
<link rel="stylesheet" href="{% versioned_static 'css/global.css' %}" />
Outputs:
<link rel="stylesheet" href="/static/css/global.css?v=feb0d0e" />
Project details
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 django-versioned-static-url-0.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f2772d71708531ad235a633ce14b9291b93d93eb0665056d476506503accc4f |
|
MD5 | 90cbc5e51eb71e5e2af1e6af6e9585df |
|
BLAKE2b-256 | b3f85c2de01f2f146aeb4b744a3e5fe818d784c8b262cf2f5c37903a59454eb1 |