Ask Your Question
0

sharing templates between askbot and our own django app

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

hjwp gravatar image hjwp
31 4 1 6

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?

delete close flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

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

Evgeny gravatar image Evgeny flag of Chile
11059 50 84 182
http://askbot.org/

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

link publish delete flag offensive edit

Your answer

Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Reliable Askbot Hosting

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 site
30 days free trial

Question tools

Follow

subscribe to rss feed

Stats

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

Seen: 119 times

Last updated: Nov 24 '11