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.

Documentation

About

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>

License

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.

Source Distribution

django-manifest-loader-1.0.0.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

django_manifest_loader-1.0.0-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file django-manifest-loader-1.0.0.tar.gz.

File metadata

  • Download URL: django-manifest-loader-1.0.0.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.2.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.5

File hashes

Hashes for django-manifest-loader-1.0.0.tar.gz
Algorithm Hash digest
SHA256 cd7a5585d17b07cf7d672c201ecb3476121f65c9b522e29f25c2ee4e9f87ab34
MD5 7f7724fad8ce9f7a76e0e71b93f00e09
BLAKE2b-256 9d8abeee999d51293668bf349ad688df066a77b822f94403a5f03237cbd0a164

See more details on using hashes here.

File details

Details for the file django_manifest_loader-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: django_manifest_loader-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 9.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.2.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.5

File hashes

Hashes for django_manifest_loader-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 17a6e5b47ff6999ca530e754d874c1e4b0c7f16e72c761e3e05bc529cee34145
MD5 6034bc752ea1e0067040a04033644a53
BLAKE2b-256 016a661471745ab044d2eae16537387c3b62205de8ea4575f1dcab1a5657b176

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