tutorial for jinja2 integration issue?
 

I'd like to add few more pages(in django template) to askbot.
(extends two_column_body.html but use django template syntax)

Or someone might want to add askbot to his/her already operational site as an add-on.

I encountered jinja2 for the first time and I find it very hard to integrate jinja2 powered templates with other regular django-templates.

I've seen some homeworks..

http://stackoverflow.com/questions/15157997/django-app-not-running-after-installing-askbot/15160726#15160726

http://askbot.org/en/question/8105/why-does-askbot-use-jinja/

I wonder if you have a plan to make it easy to integrate askbot with other parts of a site.
by providing a tutorial or
by providing regular-django template for base.html or
by .. who knows what else..

Not allowing staticfiles to work with askbot makes it harder..

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
pcompassion's avatar
21
pcompassion
asked 11 years ago, updated 11 years ago

Comments

This solution is quite interesting http://concentricsky.com/blog/2013/jan/extending-jinja2-django-templates (linked from the same SO page) although I would just ditch the django templates because Jinja2 is significantly better. You are mentioning "not allowing staticfiles to work with askbot" - it seems to work for us - where do you see the issue.

Evgeny's avatar Evgeny (11 years ago)

Ok, then suppose I have another app called MyApp.(to separate files from ones provided by askbot) I want to {% extend askbot_template.html %} from MyApp's templates. What's the required setup for this? 'Not allowing..' I don't know where I got that idea.. Probably, I saw an old askbot forum posting where it mentions staticfiles doesn't work. Maybe askbot didn't allow staticfiles and now it does?

pcompassion's avatar pcompassion (11 years ago)

http://concentricsky.com/blog/2013/jan/extending-jinja2-django-templates I tried the solution and works fine. But it breaks when you have more than 1-depth extend. a.html extend my_common.html extend_jinja jinja_template.html nothing in a.html shows up.. :(

pcompassion's avatar pcompassion (11 years ago)
see more comments