Question

Is there a tool for django that would allow me to "prep" the static HTML templates for production?

My templates are growing heavy in comments and shelved code that is useful to have when in development, but when deployed these extra comments will be an unnecessary hit on performance (and I don't want to announce them to the word).

Is there a plugin for django that would prune the HTML?

Was it helpful?

Solution

Here is a snippet for runtime processing: http://djangosnippets.org/snippets/123/ If it delays your page rendering and it is not acceptable you should write a script to iterate over templates and apply it after deployment :)

OTHER TIPS

HTML::Clean might do it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top