So the header for loop is the one that is not working?

Is organisation being fed to the view properly?

If you put in {{ organisation }} in the section that is rendering properly 
is it showing up as you expect?

JD

On Monday, September 17, 2012 10:59:16 AM UTC-6, Satinder Goraya wrote:
>
> On Mon, Sep 17, 2012 at 7:31 PM, jondykeman <jondy...@gmail.com<javascript:>> 
> wrote: 
> > Can you put the code of the template you are extending this one with? 
> Here is the file that is extending: 
>
> {% extends "report/report_header.html" %} 
> {% load i18n %} 
> <html> 
> <body> 
> {% block content %} 
> <br/> 
> <table align="center" width="80%" border="2px" cellspacing="0px"> 
>         <tr> 
>                 <td align="left"><b>Date of testing :</b></td><td 
> align="left">{{Date_of_testing}}</td> 
>         </tr> 
>         <tr> 
>                 <td align="left"><b>Type of Structure:</b></td><td 
> align="left">{{Type_of_str}}</td> 
>         </tr> 
>         <tr> 
>                 <td align="left"><b>Site location:</b></td><td 
> align="left">Latitude: {{Latitude_N}}<br/>Longitude: {{Longitude_E}} 
> </td> 
>         </tr> 
>          <tr> 
>                 <td align="left"><b>Tested in Presence of:</b></td><td 
> align="left">{{Presence_1}}, <br/>{{Presence_2}}</td> 
>         </tr> 
>         <tr> 
>                 <td align="left"><b>Report Submitted to </b></td><td 
> align="left">{{Submitted_1}}, <br/>{{Submitted_2}}, 
> </br>{{Submitted_3}}</td> 
>         </tr>                                                         
>                                                                   
> </table> 
> <br/> 
> </body> 
> </html> 
> {% endblock %} 
>
> You can see full file at: 
> http://202.164.53.122/~satinderpal/report_ok.html 
>
> > 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. 
> No, i used {% block content %} {% end block %} for that 
>
> > 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 
> Here is the base file : 
> http://202.164.53.122/~satinderpal/report_header.html 
> > the other template's code. 
> http://202.164.53.122/~satinderpal/report_ok.html 
> > 
> > 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...@googlegroups.com<javascript:>. 
>
> > To unsubscribe from this group, send email to 
> > django-users...@googlegroups.com <javascript:>. 
> > For more options, visit this group at 
> > http://groups.google.com/group/django-users?hl=en. 
>
>
>
> -- 
> 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/-/gF9AcKpbRWsJ.
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.

Reply via email to