Skip to main content

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" />

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
canonicalwebteam.versioned-static-1.0.2.tar.gz (5.0 kB) Copy SHA256 hash SHA256 Source None Jun 11, 2017

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page