I see the askbot templates use constructs like {% if settings.BLABLA %}.
From what I understand, the settings var should always be present, from askbot.context.application_settings, right?
But when I try to use {% if settings.XYZ %} in my own skin widgets, I get
Exception Type: UndefinedError
Exception Value: 'settings' is undefined
How can that be? I would post more info but don't know what could be relevant to this.
I did disable settings injection into non-askbot views to reduce impact of askbot on other apps.
Just add template settings directly in your view. If you are not comfortable with handpicking the
settings for the templates - copy a snippet from /askbot/context.py to load all the livesettings at once.
IMO it was a poor idea to put settings into the template context processor, because it slows down everything in the django project even apps that have nothing to do with askbot. I am thinking of completely moving to manually populating the template context in each view.
We are now focusing on improving performance of the app now, so cutting that fat where possible.
Create your Q&A site at askbot.com. Managed Askbot hosting at just $15/mo. Dedicated hosting, support contracts, consulting services.
create your Q&A siteAsked: 2012-02-18 10:53:36 -0500
Seen: 122 times
Last updated: Feb 18 '12
How to perform Template() on askbot setting?
Why askbot template base.html has become the default base template?
Where in the Askbot code would I find the text asking you to give a descriptive answer?
sharing templates between askbot and our own django app
translation works only partially in templates
Copyright Askbot, 2010-2011. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.