I would like to provide the same content inside two different base files.
So, I am trying to do this:
page1.html:
{% extends "base1.html" %} {% include "commondata.html" %}
page2.html:
{% extends "base2.html" %} {% include "commondata.html" %}
The problem is that I cannot use both extensions and include. Is there any way to do this? And if not, how can I accomplish the above?
commondata.html overrides the block that is specified in both base1.html and base2.html
The goal of this is to provide the same page in pdf and html format, where the formatting is slightly different. The above question, although it simplifies what I'm trying to do, if I can get an answer to this question, it will solve my problem.
python django django-templates
Net Citizen Sep 11 '09 at 4:08 2009-09-11 04:08
source share