Revision history [back]
How to perform Template() on askbot setting?
I'm pretty new to Python, and Django is even more unfamiliar, but I was trying to find a simple hack that would process a text-based askbot setting using the Django Template() function, specifically here:
http://askbot.org/en/question/519/faq-to-settings
Where what I would like to do something remotely like:
if getattr(askbot_settings, 'FORUM_FAQ',''):
faq = Template(FORUM_FAQ)
return render_into_skin(faq, data, request)
which of course doesn't work for various reasons. My question is, what exactly are the intermediate steps to get something like this to work, so that FORUM_FAQ can contain template tags like {{settings.MIN_REP_TO_VOTE_UP}}
, be processed to replace these tags, then fed into an HTTP request like faq.htm?
It seems like it should be pretty easy, but again, I don't know either python or django (or askbot) well enough to figure it out.