Skip to content

Instantly share code, notes, and snippets.

View pennersr's full-sized avatar

Raymond Penners pennersr

View GitHub Profile

Keybase proof

I hereby claim:

  • I am pennersr on github.
  • I am pennersr (https://keybase.io/pennersr) on keybase.
  • I have a public key whose fingerprint is 12D3 D482 E740 A2FE 0008 A997 6477 17F6 8507 5E10

To claim this, I am signing this object:

@pennersr
pennersr / allauth_avatar.py
Last active June 18, 2020 22:27
Support for copying profile pictures into django-avatar was removed from django-allauth. This gist contains example code that you can drop into your own project in order to reinstate that functionality.
import urllib2
from django.template.defaultfilters import slugify
from django.core.files.base import ContentFile
from django.dispatch import receiver
from avatar.models import Avatar
from allauth.account.signals import user_signed_up