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.7.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | bef3491559e8867118d998080f504d66dec831e42fab610784b339802772289b |
|
MD5 | 917248633ab80f6f368368c190e2ebf8 |
|
BLAKE2b-256 | 2d85425fda34ad4a3f80ff811703b25a74d3535a19f9144f1b2b255c2f4233a5 |