Sunday, March 27, 2011

simple friends template help

need some help setting up templates for friends list:

how do I iterate a list of invited friends and are friends? I have
tried:


{% for friends in Friendship.objects.are_friends %}

<li>target_user: {{ friends.target_user}}</li>
<li>current_user:{{ friends.current_user}}</li>
<li>are_friends: {{ friends.are_friends}}</li>
<li>is_invited: {{ friends.is_invited}}</li>

{% endfor %}

gives me nothing but:

<li>{{ is_invited }}</li>
<li>{{ are_friends }}</li>
<li>{{ target_user }}</li>
<li>{{ current_user }}</li>


output:

false
false
name
name

I have been trying to figure this out for months. Please help.

--
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