This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from allauth.account.utils import perform_login | |
from allauth.exceptions import ImmediateHttpResponse | |
from allauth.socialaccount.signals import pre_social_login | |
from django.conf import settings | |
@receiver(pre_social_login) | |
def link_to_local_user(sender, request, sociallogin, **kwargs): | |
email_address = sociallogin.account.extra_data['email'] | |
users = User.objects.filter(email=email_address) | |
if users: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Install wkhtmltopdf on Ubuntu | |
# This was tested on: | |
# - Ubuntu 14.04 x64 | |
sudo apt-get update | |
sudo apt-get install xvfb | |
sudo apt-get install libfontconfig | |
sudo apt-get install wkhtmltopdf |