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-0.2.0.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_manifest_loader-0.2.0-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: django-manifest-loader-0.2.0.tar.gz
  • Upload date:
  • Size: 7.4 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-0.2.0.tar.gz
Algorithm Hash digest
SHA256 7e01b8434154f72462aec878c62109521868966d850735f78f70bb1da4a68bfd
MD5 f6af23fb734f720dc752805997e8fd6f
BLAKE2b-256 fb1e707944d321f8f7a41339e96f5f98c25250d936fb9ce89fbd1e752ed977c6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: django_manifest_loader-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 8.9 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-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fa75b4d677b71120a6003059d0af1741defc4d7301854a84835fa06dc4a0ec79
MD5 dbd64031568582e471f8fac8243aef8d
BLAKE2b-256 d0b247f0b873c2a001dd58e82d8b344e766574c84b4cefefd07888bbbf0c6e3d

See more details on using hashes here.

Supported by

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