API Reference

For the most part you shouldn’t need this, as this app is meant to be interacted with through template tags alone.

manifest_loader.utils.manifest(key, context=None)

Looks up the key against the manifest file to return the url of the key

Parameters
  • key – string indicating the key to pull from the manifest file

  • context – optional, Django template context

Returns

string that points to the url of the requested resource

manifest_loader.utils.manifest_match(pattern, output, context=None)

Looks up the provided pattern against the manifest and injects all matching values into the output string.

Parameters
  • pattern – A pattern used to match against the keys in the manifest

  • output – A string containing the substring {match}. The output is repeated for each match found in the manifest and the substring is replaced by the urls derived from the manifest.

  • context – Optional Django template context

Returns

Returns a string of urls embedded into the output

class manifest_loader.templatetags.manifest.ManifestMatchNode(token)

Template node for the manifest match tag

render(context)
returns a string of all found urls,

each embedded in the provided string

class manifest_loader.templatetags.manifest.ManifestNode(token)

Template node for the manifest tag

render(context)

returns the url of the found asset

manifest_loader.templatetags.manifest.do_manifest(parser, token)

Returns the manifest tag

manifest_loader.templatetags.manifest.do_manifest_match(parser, token)

Returns manifest match tag