Django template tag to load static files inline with your template.
Project description
django-staticinline
Similiar to Django’s static templatetag, but this includes the file directly in the template, rather than a link to it.
Example:
{% load staticinline %}
<style type="text/css">{% staticinline "myfile.css" %}</style>
<script>{% staticinline "myfile.js" %}</script>
Becomes:
<style type="text/css">body{ color: red; }</style>
<script>alert("Hello World");</script>
For further information and installation instructions see the docs on https://docs.elephant.house/django-staticinline/.
Changelog
(master)
Added support for Django 2.1 and Python 3.7.
Added proper documentation.
Added sri (Subresource Integrity) encoder to generate a sha256 for a given file.
v1.1 (2018-08-09)
Added support for custom data encoders to modify file content on the fly.
Added data and base64 encoders, both convert data into base64.
v1.0 (2018-04-29)
Initial release.
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-staticinline-1.2.tar.gz
(18.3 kB
view hashes)
Built Distribution
Close
Hashes for django_staticinline-1.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a4800578f5984acfcd7b6f191c26468fb7783f013567e6bb1b7c733520c191ea |
|
MD5 | 5f8000999f5f2cc3d6746a23baff7242 |
|
BLAKE2b-256 | aefb7bbd8cec19af454a88e5f44188929ae4fe0fef7c9971b12b88fe7b2acf91 |