On Thu, 2006-06-22 at 11:52 +0100, Frankie Robertson wrote:
> On 22/06/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
> >
> > On Thu, 2006-06-22 at 10:01 +, Jaroslaw Zabiello wrote:
> > > Django uses Python modules instead of classes. The problem is how to
> > > avoid duplication of the cod
You can also make use of Inclusion Tags. Very easy to use:
http://www.djangoproject.com/documentation/templates_python/
#inclusion-tags
I use them for all dynamic sections that appear across templates.
On 22/06/2006, at 8:32 PM, Malcolm Tredinnick wrote:
>
> On Thu, 2006-06-22 at 10:01 +,
On 22/06/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
>
> On Thu, 2006-06-22 at 10:01 +, Jaroslaw Zabiello wrote:
> > Django uses Python modules instead of classes. The problem is how to
> > avoid duplication of the code in controllers when I want to put some
> > data to parent templates?
On Thu, 2006-06-22 at 10:01 +, Jaroslaw Zabiello wrote:
> Django uses Python modules instead of classes. The problem is how to
> avoid duplication of the code in controllers when I want to put some
> data to parent templates? Let see the example:
>
> base.html:
> {% block welcome %}
> Hello {
Django uses Python modules instead of classes. The problem is how to
avoid duplication of the code in controllers when I want to put some
data to parent templates? Let see the example:
base.html:
{% block welcome %}
Hello {{ name }}!
{% endblock %}
{% block main %}{% endblock %}
test1.html:
{% e
5 matches
Mail list logo