Can you put the code of the template you are extending this one with? What I would guess from what you said is that you might be using {% block head %} {% endblock %} in the other template that extends this one.
In that case you would override that for loop. If you want to add to the head and also retain that for loop you will need to move the for outside of the block in the base template, but will be able to tell better once seeing the other template's code. JD On Monday, September 17, 2012 1:15:25 AM UTC-6, Satinder Goraya wrote: > > I want to extend a template file into the other file. I get fine > results when done simply but whenever I use the template containing > 'for' tag into the other, it does not show any results. > My code for template which is to be extended is here : > > #template file to be extended into the other > <body> > <div id="header"> > {% block header %} > > {% for organisations in organisation %} > <h1 align="center" style="margin-bottom:0;" > >{{organisations.name}}</h1> > <h3 align="center" style="margin-top:0; > margin-bottom:0;">{{organisations.address}}</h3> > {% endfor %} > > > {% endblock %} > </div> > {% block content %}{% endblock %} > > Please see where I am going wrong. > > -- > Satinderpal Singh > http://satindergoraya.blogspot.in/ > http://satindergoraya91.blogspot.in/ > -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/wTGigHz33vYJ. To post to this group, send email to django-users@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.