Hello,
In the model I have :
def campaign(request, campaign_id):
ctx = {'camppeople': PersonPhones.objects.all() }
return render_to_response("campaign.html", ctx,
context_instance=RequestContext(request))
I also have a place where I store the info whether I want to call that
person:
class CampPeople(models.Model):
person = models.ForeignKey(Person)
camp = models.ForeignKey(Campaign)
docall = models.BooleanField(True)
called = models.BooleanField(False)
objects = CampaignManager()
The template is:
<table>
{% for piplok in camppeople %}
<tr>
<td>{{ piplok.person.label }}</td>
<td>
{% if piplok.docall %}
dzwon
{% else %}
nie dzwon
{% endif %}
<td>{{ piplok.phone }}</td>
</tr>
{% endfor %}
</table>
The prob;em is that there is no Django magic, piplok.docall is always
false. If you need more data I'll supply it.
Please help, I am new to Django. Thanks in advance.
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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.