I use django flatpages for a lot of content on our site, I'd like to extend it to accept django template tags in the content as well.
I found this snippet but after much larking about I couldn't get it to work. Am I correct in assuming that you would need too "subclass" the django flatpages app to get this to work? Is this best way of doing it? I'm not quite sure how to structure it, as I don't really want to directly modify the django distribution.
1. A simple page view wich will render template tags by loading a template for each page:
in
url.py
in
my_app/views.py
2. Another method with flat pages stored in database, is to use a "template evaluation tag" in your template like this one.
edit You just have to modify flatpages template like this:
An alternative approach could be to write a simple app based on the
direct_to_template
generic view.