This is your problem: {%</b></span> <b>else</b> <span class="s1"><b>%}
Everything between {% and %} is interpreted as template-syntax code. On Thu, May 17, 2012 at 7:39 PM, Bob Loblaw <hudso...@gmail.com> wrote: > I was cruising along fine, but am stuck now... Any help would be > greatly appreciated > > OS: Mac OS X Version 10.6.8 > Python: 2.6.1 > Django: 1.4 > > Issue: system throwing an error message during template rendering when > trying to implement Django template system. So I guess I must have a > config snag somewhere in Django. > > > > Here is the error message... > > Error during template rendering > > In template /data/templates/polls/index.html, error at line 20 > Invalid block tag: '</b></span><span' > 10 p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Courier; > color: #008080; background-color: #e0ffb8} > 11 p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Courier; > background-color: #e0ffb8} > 12 p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Courier; > color: #000080; background-color: #e0ffb8} > 13 span.s1 {color: #999999} > 14 span.s2 {color: #000000} > 15 span.s3 {color: #000080} > 16 span.s4 {color: #bb8844} > 17 </style> > 18 </head> > 19 <body> > 20 <p class="p1"><span class="s1"><b>{%</b></span><span class="s2"> > <b>if</b> </span>latest_poll_list<span class="s2"> </span><span > class="s1"><b>%}</b></span></p> > 21 <p class="p2"><span class="Apple-converted-space"> </span><span > class="s3"><ul></span></p> > 22 <p class="p1"><span class="s2"><span class="Apple-converted- > space"> </span></span><span class="s1"><b>{%</b></span><span > class="s2"> <b>for</b> </span>poll<span class="s2"> <b>in</b> </ > span>latest_poll_list<span class="s2"> </span><span class="s1"><b>%}</ > b></span></p> > 23 <p class="p1"><span class="s2"><span class="Apple-converted- > space"> </span></span><span class="s3"><li><a</ > span><span class="s2"> </span>href=<span class="s4">"/polls/</ > span><span class="s1"><b>{{</b></span><span class="s2"> </ > span>poll.id<span class="s2"> </span><span class="s1"><b>}}</b></ > span><span class="s4">/"</span><span class="s3">></span><span > class="s1"><b>{{</b></span><span class="s2"> </span>poll.question<span > class="s2"> </span><span class="s1"><b>}}</b></span><span > class="s3"></a></li></span></p> > 24 <p class="p2"><span class="Apple-converted-space"> </span><span > class="s1"><b>{%</b></span> <b>endfor</b> <span class="s1"><b>%}</b></ > span></p> > 25 <p class="p3"><span class="s2"><span class="Apple-converted- > space"> </span></span></ul></p> > 26 <p class="p2"><span class="s1"><b>{%</b></span> <b>else</b> <span > class="s1"><b>%}</b></span></p> > 27 <p class="p2"><span class="Apple-converted-space"> </span><span > class="s3"><p></span>No polls are available.<span > class="s3"></p></span></p> > 28 <p class="p2"><span class="s1"><b>{%</b></span> <b>endif</b> <span > class="s1"><b>%}</b></span></p> > 29 </body> > 30 </html> > > > Here is the index.html (verbatim from tutorial)... > > {% if latest_poll_list %} > <ul> > {% for poll in latest_poll_list %} > <li><a href="/polls/{{ poll.id }}/">{{ poll.question }}</a></ > li> > {% endfor %} > </ul> > {% else %} > <p>No polls are available.</p> > {% endif %} > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > 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. > > -- Marcin Tustin Tel: 07773 787 105 -- You received this message because you are subscribed to the Google Groups "Django users" group. 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.