Login

Snippets by MikiSoft

Snippet List

Raw include from static dir tag

This is useful when you don't want to put any `{% verbatim %}` tag in the file(s) you're including within template(s) (because you want it/them completely raw) and when you want to load such file(s) from static dir(s), as native `{% include %}` tag can't achieve that (still). Put the provided code in *templatetags/rawinclude.py* in your Django app, and then use it in your template(s) like this: `{% load rawinclude %}{% raw_include 'file.html' %}`

  • include
  • verbatim
  • raw
Read More

MikiSoft has posted 1 snippet.