First time here? Check out the FAQ!

Martin Burchell's profile - activity

2016-02-15 03:07:51 -0500 received badge Notable Question (source)
2014-09-22 08:19:52 -0500 received badge Popular Question (source)
2013-03-10 23:34:48 -0500 received badge Popular Question (source)
2012-11-15 18:01:04 -0500 received badge Famous Question (source)
2012-06-24 01:14:14 -0500 received badge Famous Question (source)
2011-11-15 07:02:53 -0500 received badge Necromancer ( source )
2011-11-15 07:02:53 -0500 received badge Teacher ( source )
2011-11-15 07:02:53 -0500 received badge Self-Learner ( source )
2011-11-15 05:00:46 -0500 answered a question How do we include "external" templates in our custom skin?
2011-06-30 06:03:29 -0500 received badge Editor (source)
2011-06-30 05:28:47 -0500 asked a question Error '_' is undefined

I'm not sure what I've done here (maybe messed up my configuration) but I'm seeing this error:

Exception Type: UndefinedError at /forum/questions/
Exception Value: '_' is undefined

Full trace at http://dpaste.com/561250/

askbot 0.7.3

Does this ring any bells?

Edit:
USE_I18N = True
Settings are at http://dpaste.com/561263/

Also the other pages work fine eg tags, people, badges and I can see the French translation. It's just the questions page that shows this problem.

Edit: Replacing _() with gettext() in tab_bar.html fixes the problem. Using jinja2 2.5.5.

2011-06-15 05:50:40 -0500 commented answer How do we include "external" templates in our custom skin?
Thanks. I think we're going to hit another problem because we're not using jinja2 for our templates so it might be that we'll end up having to replicate modified versions of our templates in our custom skin directory after all. Either that or fix our templates to be compatible with jinja2 but that will be a lot of work.
2011-06-15 03:53:11 -0500 commented answer How do we include "external" templates in our custom skin?
Hi Evgeny. Thanks for your answer. We are using ASKBOT_EXTRA_SKINS_DIR and have put the custom skin in there. But we want our skin to be based on templates that exist elsewhere in our application and don't want to have to place copies of them in our custom skins directory.
2011-06-14 11:23:23 -0500 received badge Nice Question (source)
2011-06-14 11:19:28 -0500 received badge Student (source)
2011-06-14 11:18:21 -0500 asked a question How do we include "external" templates in our custom skin?

Hi

We've created a custom skin and we're trying to base our skin on templates used elsewhere on our website ie those present in TEMPLATE_DIRS. Is this a bad idea?

It looks like askbot is only looking in the skins directory for templates as it can't find templates in our application. Looking at the SkinEnvironment class in skins/loaders.py, _get_loaders() creates file system loaders for the custom skin directory. We can modify this to append TEMPLATE_DIRS to the loaders and it seems to work. Is there a better way to do what we want? I guess we could use symbolic links from the skin directory to the application templates directory but that seems a bit of a hack.

I suppose ultimately we're looking to embed askbot so that it looks like any of the other pages on our website so tell us if we're going about this the wrong way.