Ask Your Question
0

sharing templates between askbot and our own django app

asked 2011-11-24 10:24:16 -0600

hjwp gravatar image

Hey there,

We've been working on customising the askbot skin to fit in with the rest of our site (pythonanywhere.com, if you were getting curious!) and it would be cool to be able to re-use some of our normal django templates, since jinja2 and django are reasonably compatible... eg using {% include %}.

the problem is that askbot/jinja2 looks for its templates in ASKBOT_EXTRA_SKINS_DIR, and our templates are elsewhere. Any ideas?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2011-11-24 10:36:16 -0600

Evgeny gravatar image

Hey, ASKBOT_EXTRA_SKINS_DIR should work, but askbot template resolver is expecting that you have a skin directory and inside it a template directory, so you might need to move around some of your templates.

Other than that - when django templates are compatible with Jinja they should just work, otherwise you'd have to duplicate some of the templates, should not be too much work though for the standard header & footer modification.

The reason we switched to Jinja2 is that they are significantly faster and allow arbitrary nesting of includes without losing in performance (that's besides some other improvements).

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2011-11-24 10:24:16 -0600

Seen: 245 times

Last updated: Nov 24 '11