Skip to main content

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?a23bd10

Installation

# settings.py
INSTALLED_APPS += ['django_versioned_static_url']

Usage

# template file
{% 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

django-versioned-static-url-0.1.1.tar.gz (4.5 kB view details)

Uploaded Source

File details

Details for the file django-versioned-static-url-0.1.1.tar.gz.

File metadata

File hashes

Hashes for django-versioned-static-url-0.1.1.tar.gz
Algorithm Hash digest
SHA256 dfbc9b44413d0ad0952bddba01edf8860aa394f0758f9ba139980baad695cdd1
MD5 241bf03325ab2c7f594bae8cc0558114
BLAKE2b-256 cdd20abd427a8f1254ecf1aba7abf62a06089c9d30de80da452bab1fe065d02e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page