Saturday, October 15, 2011

Clearly I do not understand something in templating

Hello,

This is in views.py :

def campaign(request, campaign_id):
ctx = {'phones': PersonPhones.objects.all(), "camppeople":
CampPeople.objects.all() }
return render_to_response("campaign.html", ctx,
context_instance=RequestContext(request))

This is the template :

<table>

{% for piplok in camppeople %}
{% if piplok.camppeople.docall %}
YES
{% else %}
NOT
{% endif %}
{% endfor %}

</table>

The records surely have all the record docall set to true but I see
full of NOTs in the browser. Why? What should I do to see full of
YESes.

Regards,

Piotr Hosowicz

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate