Maybe you could use the ifequal tag in your template, not sure what
your trying to do , but in your view you could do a friend =
Friends.objects.all() and in your template,

{% ifequal friend.isfriend True %}
do something here
{%endifequal%}

{% ifequal friend.is_invited %}
something else
{%endifequal%}

On Mar 27, 7:32 pm, justin jools <devhe...@gmail.com> wrote:
> 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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to