Easy Way to Escape Django Template Variables -


For a new project we are writing documents about Django template system we also have documentation Project uses Django, so Jiganga raises all our example variables in the sample code and tries to render them. Its the only way we have to use it, but it makes our code really unreadable. Can Django be a way to ignore all template variables in a specific section? Due to limitations in the Django template lexer (such as being a Clooney Hack), it is impossible though

If you enter your example code in separate files, you can use the ssi tag:

  {% ssi / path / to / My / code /examples/example01.html%}  

and this will not parse the file, just include verbatim in it though, there are limitations too that you use the variables in the path involved Can not do (Ie, if you take a template location, you will need to re-type or at least find and replace your template files), and you must include it in your settings.py in settings (i.e. / path / to / my / code / example ). (See.)


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -