Thursday 15 August 2013

for-loop interferes with others in web.py -


I am a newbie in web.py

Two templates exist for loops in my template script, it looks like a prefix ( code1 ) interfaces ( code2 ) later. Each one of them displays well alone, but when they are in a template script.

code1 $ for data in the post: & lt; Div id = "title" & gt; & Lt; H2 & gt; & Lt; A href = "/ view / $ data.id" & gt; $ Data.title & lt; / A & gt; & Lt; / H2 & gt; & Lt; / Div & gt; & Lt; Div id = "marker" & gt; & Lt; P & gt; & Lt; A href = "about /" & gt; Users & lt; / A & gt; $ Data.post_on & lt; A href = "/ catalog / $ datacatalog" & gt; $ Data.catalog & lt; / A & gt; & Lt; / P & gt; & Lt; / Div & gt; & Lt; Div id = "content" & gt; & Lt; P & gt; $ Data.content & lt; / P & gt; & Lt; / Div & gt;

code2
$ (cat, CTR). In Catcollector (post). ; Ul & gt; & Lt; Li & gt; & Lt; A href = "/ catalog / $ cat" & gt; $ Cat & lt; / A & gt; ($ CTR) & lt; / Li & gt; & Lt; / Ul & gt;

I am confused with this incident. Do anyone know about this? Thank you in advance

I'm not sure this is your only problem, but like your indentation Looks like things inside the loop should not be indented.

No comments:

Post a Comment