Skip to content

Instantly share code, notes, and snippets.

This file has been truncated, but you can view the full file.
# Title: StevenBlack/hosts
#
# This hosts file is a merged collection of hosts from reputable sources,
# with a dash of crowd sourcing via GitHub
#
# Date: 05 May 2022 21:53:51 (UTC)
# Number of unique domains: 113,498
#
# Fetch the latest version of this file: https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
# Project home page: https://github.com/StevenBlack/hosts
@kouroshshafi
kouroshshafi / profile_picture_django_social_auth
Created January 23, 2012 12:39
Extending User class to save profile picture in django-social-auth when registering
# This is models.py for a new user profile that you would like to create.
"""
this gist gets an id from django-social-auth and based on that saves the photo from social networks into your model. This is one of the best ways to extend User model because this way, you don't need to redefine a CustomUser as explained in the doc for django-social-auth. this is a new implementation based on https://gist.github.com/1248728
"""
from django.contrib.auth.models import User
from django.db.models.signals import post_save
from django.db import models