I think you can use "is", but try this:
{% if not likes.user == request.user %}
On Friday, August 30, 2013 12:21:41 PM UTC-5, Robin Lery wrote:
>
>
> I am getting an error:
>
> TemplateSyntaxError at /forum/
>
> Unused 'is' at end of if expression.
>
>
>
> On Fri, Aug 30, 2013 at 10:05 PM, C. Kir
To remove the current user from your list just use an if statement in your
template that tests the user instance you are iterating over against
request.user
i.e.
{% for likes in forum.likes.all %}
{% if not likes.user is request.user %}{{likes.get_full_name}}{% endif
I can still see my name (the logged in user's name) on the list..
On Fri, Aug 30, 2013 at 10:05 PM, C. Kirby wrote:
> To remove the current user from your list just use an if statement in your
> template that tests the user instance you are iterating over against
> request.user
> i.e.
>
>
3 matches
Mail list logo