Q:

Django - Get gravatar from view

I'm using django-gravatar in templates to display the avatars of my users.
Now I'd like to get the URI of an avatar from a view.
I tried to use the template tag functions like
from gravatar import templatetags
_get_gravatar_id('test@test.com')
# or
gravatar_for_email('test@test.com')

But the functions are not defined
How can I access them ?

A:

You should import them.
from gravatar.templatetags.gravatar import _get_gravatar_id, gravatar_for_email

