Installation¶
Install django-render-static or clone from GitHub:
pip install django-render-static
Add ‘render_static’ to your
INSTALLED_APPSINSTALLED_APPS = [ 'render_static', ... ]
Add a
STATIC_TEMPLATESconfiguration directive to your settings file:STATIC_TEMPLATES = { 'templates' : [ ('path/to/template', {'context' { 'variable': 'value' }}) ] }
Run
renderstaticpreceding every run ofcollectstatic:manage.py renderstatic manage.py collectstatic