Skip to main content

Versioning django static files in production. Add md5 suffix to url

Project description

# django-static-md5url

This is extension for versioning static files in Django projects, if `PRODUCTION = True`.

For example this css file: ` <link rel="stylesheet" href="{% md5url 'base/css/styles.min.css' %}"> ` will be replace with: ` <link rel="stylesheet" href="/static/base/css/styles.min.css?v=a6e2ba64"> `

where a6e2ba64 is first 8 characters of md5 file sum.

# Installation

Install using pip ` pip install django-static-md5url `

Add ` django_static_md5url ` to INSTALLED_APPS.

# Configuration

Load `{% load md5url %}` template tag in your Django template.

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

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

Source Distribution

django-static-md5url-0.1.tar.gz (2.9 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page