[Solved] Python in django Template [closed]


As already mentionned, you cannot (at least not out of the box and not without huge pain) directly embed Python code in an Django template, and as far as I’m concerned that’s a GoodThing(tm) – the “server page” model (PHP, ASP1 etc) has long proven to be a failure wrt/ maintainability.

Now for the good news : Django’s template system is extensible so you can provide your own custom template tags and filters, which is also a way to “embed” Python code in your template.

solved Python in django Template [closed]