Skip to main content

Django template tag to load static files inline with your template.

Project description


Similiar to Django’s static templatetag, but this includes the file directly in the template, rather than a link to it.


{% load staticinline %}

<style type="text/css">{% staticinline "myfile.css" %}</style>
<script>{% staticinline "myfile.js" %}</script>


<style type="text/css">body{ color: red; }</style>
<script>alert("Hello World");</script>

For further information and installation instructions see the docs on



  • 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.

Files for django-staticinline, version 1.2
Filename, size File type Python version Upload date Hashes
Filename, size django_staticinline-1.2-py2.py3-none-any.whl (20.6 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size django-staticinline-1.2.tar.gz (18.3 kB) File type Source Python version None Upload date Hashes View

Supported by

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