jazzband/django-avatar

Invalid filter: 'has_avatar'

Closed this issue · 2 comments

I used {% url 'avatar_change' %} page to change avatar and see a friendly message

You haven't uploaded an avatar yet. Please upload one now.

Since, I don't want to use a separate page for changing avatar, I'm customising own template to change avatar.

To check whether user has avatar or not

{{ request.user|has_avatar }}

as given in the documentation, but it gives error as

Invalid filter: 'has_avatar'

Have you included {% load avatar_tags %} in your template?

I had include it in base template, I thought it would work because I'm extending base template. Added in respective template and it works.

Thanks for this awesome app.

Why it's not showing changed avatar?

I changed avatar and uploaded .png and again tried with jpeg but still showing gravatar image.

I'm using

{% avatar user 400 %}

issue was with caching, set caching to FALSE and now working.