Is it possible to enter {{ variable }}
into a django flatpage and if so, how?
Asked
Active
Viewed 537 times
2

Kevin Brown-Silva
- 40,873
- 40
- 203
- 237

MacPython
- 17,901
- 10
- 42
- 48
1 Answers
1
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
- 72,339
- 21
- 134
- 141
-
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 – Steve Jalim Aug 24 '10 at 09:33