django - Basic google app engine (python) templating issue -


After going through some basic tutorials on app engine and webapp framework, I am trying to display those documents Which are related to the project I created (for example {% ifequal project.key doc.parentproject%}) I have created several documents that are actually similar to a Dock Pierre project to do keys from the project, but in some way Never walk Is obtained. If I change project.key for a real project key value, then it gives the right for those specific kits. Am I missing some basic templing things here? I can not find any answer on Google or django site (any webapp using the Designing Templating Engine) Any help would be appreciated.

Sorry if this is the basic NewBi content ...

for project% {}%} & lt; Blockquote & gt; & Lt; Div style = "border: 1 px solid # 999; padding: 20px;" & Gt; & Lt; H3 & gt; {{Project.projectname | Part}} & lt; / H3 & gt; & Lt; H5 & gt; {{Project.key}} & lt; / H5> & Lt; Table border = "1" cellpadding = "5" cellspacing = "0" width = "600" & gt; & Lt; TR & gt; & Lt; Td> Doctor Feed Name & lt; / Td> & Lt; Td> Feed author & lt; / Td> & Lt; Td> Spreadsheet url & lt; / Td> & Lt; Td> The original project & lt; / Td> & Lt; Td> Created & lt; / Td> & Lt; TD & gt; & Nbsp; & Lt; / TD & gt; & Lt; / TR & gt; {% Doc% doc%} {% forable project.key doc.parentproject%} & lt; Tr & gt; & Lt; Td> Doctor's name: {{doc.name | Escape}} & lt; / Td> & Lt; Td> {{Doc.author}} & lt; / Td> & Lt; Td> {{Doc.link}} & lt; / Td> & Lt; Td> {{Doc.parentproject}} & lt; / Td> & Lt; Td> {{Doc.date}} & lt; / Td> & Lt; TD & gt; Remove & lt; / TD & gt; & Lt; / TR & gt; {% Endifequal%} {% endfor%} & lt; / Table & gt;

{% endfor%}

view the controller code Without the one who provides the value of this template, it is really hard to diagnose the problem you have, but I think the list of docs variable doctor Those institutions which are clearly expecting.

In terms of a good design, I suggest that the project unit has given such property in which there is a list of documents associated with it. It seems that each document is dependent on an original project, so it will be easier and cleaner for this code:

  {project.docs%} for doc ... rendering me Here ... {% endfor%}  

What do you have


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -