views:

36

answers:

1

Is it possible to enter {{ variable }} into a django flatpage and if so, how?

Thanks!

A: 

Never tried this. The documentation says that Flatpage templates are passed a single context variable, flatpage, which is the flatpage object (emphasis mine). Based on this I'd venture a guess that this is not possible. There might be workarounds (such as writing your own wrapper over the views) but I haven't see them in use.

Manoj Govindan
Thanks for the quick answer
MacPython
I agree - and context processors aren't run for flatpages IIRC, so you can't inject an extra var that way either. You could write your own version of Flatpages - it's not much work - that lets you inject custom vars as well, mind you
stevejalim