X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/0bb67240e8bc535ec703e34262487ba902c91079..6ed1d78c6ca14fd002c7a00867d1964e0c4ea4a8:/src/wolnelektury/views.py?ds=inline diff --git a/src/wolnelektury/views.py b/src/wolnelektury/views.py index 21151510d..a5db0a83f 100644 --- a/src/wolnelektury/views.py +++ b/src/wolnelektury/views.py @@ -4,11 +4,12 @@ # from datetime import date, datetime import feedparser +from allauth.socialaccount.views import SignupView from django.conf import settings from django.contrib import auth from django.contrib.auth.decorators import login_required -from django.contrib.auth.forms import UserCreationForm, AuthenticationForm +from django.contrib.auth.forms import AuthenticationForm from django.core.cache import cache from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import render @@ -22,7 +23,7 @@ from catalogue.models import Book, Collection, Tag, Fragment from ssify import ssi_included from social.utils import get_or_choose_cite -from wolnelektury.forms import RegistrationForm +from wolnelektury.forms import RegistrationForm, SocialSignupForm def main_page(request): @@ -186,6 +187,10 @@ def widget(request): return render(request, 'widget.html') +class SocialSignupView(SignupView): + form_class = SocialSignupForm + + def exception_test(request): msg = request.GET.get('msg') if msg: