The other templates doesnt override the categories block... Its just
like:
{% extends "base.html" %}

{% block content %}
some content here
{% endblock %}

I mean, the base template should be receiving the context? Or do I
have to find another solution? I could put a include on the base
template to the other template, but it doesnt seem to me like an
elegant solution.

On 19 abr, 23:46, Adam Patterson <fakeemp...@gmail.com> wrote:
> What does the other template look like? Are you overridding the
> categories block?
>
>
>
> On Tue, Apr 20, 2010 at 5:17 AM, Thales <thales....@gmail.com> wrote:
> > Good evening,
>
> > I am learning django with the django book. I decided to develop a
> > simple news system just to practice,
> > The base layout should show all the news categories in a block, and
> > each other page should modify another block.
> > Here is the base:
> > <html>
> > <head>
> >    <title>Titulo</title>
> > </head>
> > <body>
> > {% block categories %}
> > CATEGORIES
> > {% for categorie in categories %}
> > {{ categorie.title }}<br >
> > {% endfor %}
> > <hr>
> > {% endblock %}
>
> > {% block conteudo %}
> > {% endblock %}
> > </body>
> > </html>
>
> > In the other template files I just extend the base template. But the
> > base content dont get the categories by context. If I put this code in
> > the final template file everything works fine. But I dont think that
> > is very elegant to repeat it in every single template file, haha.
>
> > Thanks!
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Django users" group.
> > To post to this group, send email to django-us...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > django-users+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/django-users?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/django-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to