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?v=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.4.tar.gz (4.7 kB view details)

Uploaded Source

File details

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

File metadata

File hashes

Hashes for django-versioned-static-url-0.4.tar.gz
Algorithm Hash digest
SHA256 6f9f2a200e186b32c100ef4e3e1083b47201c4df6b5d9fac0e2c3c18a70309d1
MD5 2aab2183f70fc3d3bba82ecdd88536f3
BLAKE2b-256 08c5564fcf008865099a080b0159b1a6c30f8a824aa58cf69048371127b99445

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