سؤال

I set up my project with django-allauth and django-avatar to display the social user's profile avatar next to their user options nav menu on login. I've followed the allauth documentation but on login I'm only seeing the generic "gravatar" placeholder profile image rather than the image from the user's Twitter profile [screenshot from my app of logged in user's nav]:

my app

What step did I miss or make a mistake on?

settings.py

INSTALLED_APPS = (
     ...
    'allauth',
    'allauth.account',
    'allauth.socialaccount',
    'allauth.socialaccount.providers.twitter',
    'avatar',
    ...
)

SOCIALACCOUNT_AVATAR_SUPPORT = 'avatar'
AVATAR_STORAGE_DIR = rel('media')
MEDIA_URL = 'http://' + AWS_STORAGE_BUCKET_NAME + '.s3.amazonaws.com/'

then in my template with:

{% if user.is_authenticated %}
{% load avatar_tags %}
   {% avatar user 32 %}
...
{% endif %}

thanks

هل كانت مفيدة؟

المحلول

Disregard, I actually do/did have it set up correctly. I was just logged in with a test account that had gone through auth and profile creation prior to configuring my avatar settings and adding avatar to my db tables. Leaving this up for reference in case it's helpful to anyone else.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top