First time here? Check out the FAQ!
0

sharing templates between askbot and our own django app

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?

hjwp's avatar
31
hjwp
asked 2011-11-24 10:24:16 -0600
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

0

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).

Evgeny's avatar
13.2k
Evgeny
answered 2011-11-24 10:36:16 -0600
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments