Skip to main content

A Django app to load webpack assets.

Project description

Django Manifest Loader

Build Status Build Status contributions welcome

Reads a manifest file to import your assets into a Django template. Find the URL for a single asset or the URLs for multiple assets by using pattern matching against the file names. Path resolution handled using Django's built-in staticfiles app. Minimal configuraton, cache-busting, split chunks.



Turns this

{% load manifest %}
<script src="{% manifest 'main.js' %}"></script>

Into this

<script src="/static/main.8f7705adfa281590b8dd.js"></script>

Quick reference:

Manifest tag

{% load manifest %}

<script src="{% manifest 'main.js' %}"></script>

turns into

<script src="/static/main.8f7705adfa281590b8dd.js"></script>

Manifest match tag

{% load manifest %}

{% manifest_match '*.js' '<script src="{match}"></script>' %}

turns into

<script src="/static/vendors~main.3ad032adfa281590f2a21.js"></script>
<script src="/static/main.8f7705adfa281590b8dd.js"></script>


Django Manifest Loader is distributed under the 3-clause BSD license. This is an open source license granting broad permissions to modify and redistribute the software.

Project details

Download files

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

Files for django-manifest-loader, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size django_manifest_loader-1.0.0-py3-none-any.whl (9.7 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size django-manifest-loader-1.0.0.tar.gz (8.2 kB) File type Source Python version None Upload date Hashes View

Supported by

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