django-allauth

Django allauth social login: automatically linking social site profiles using the registered email

眉间皱痕 提交于 2019-12-17 17:24:53
问题 I aim to create the easiest login experience possible for the users of my Django site. I imagine something like: Login screen is presented to user User selects to login with Facebook or Google User enter password in external site User can interact with my site as an authenticated user Ok, this part is easy, just have to install django-allauth and configure it. But I also want to give the option to use the site with a local user. It would have another step: Login screen is presented to user

Django all-auth Form errors not displaying

故事扮演 提交于 2019-12-14 01:45:52
问题 I am using django-allauth and whenever I input a wrong password in login form,the page just reloads and doesn't show any error.This is my html code: <form class="login" method="POST" action="{% url 'account_login' %}"> {% if form.errors %} {% for field in form %} {% for error in field.errors %} <div class="alert alert-error"> <span><b> {{error}} </b><span> </div> {% endfor %} {% endfor %} {% endif %} {% csrf_token %} <div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label"> {

prevent user login after registration using django-allauth

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-13 18:13:40
问题 i'm using django-allauth for my django app. by default, when a user successfully sign's up, they are automatically logged in. how do you override the default behaviour and prevent the user from logging in after after successful signup. After the user signs up, he/she must be redirected to the login page. ive disabled email verification. Thank you. # settings.py LOGIN_REDIRECT_URL = 'welcome' ACCOUNT_AUTHENTICATED_LOGIN_REDIRECTS = False ACCOUNT_LOGOUT_REDIRECT_URL = 'thanks' ACCOUNT_EMAIL

Login and Registration on the index page using django allauth

瘦欲@ 提交于 2019-12-13 12:34:02
问题 I am using django-allauth . I want the login and signup forms both on the home page of my website and not on '/accounts/login' or '/accounts/signup' I have created a separate app. The following code is in views.py from allauth.account.views import SignupView from allauth.account.forms import LoginForm class CustomSignupView(SignupView): # here we add some context to the already existing context template_name = 'index.html' def get_context_data(self, **kwargs): # we get context data from

How to logout the facebook using django-allauth? [closed]

老子叫甜甜 提交于 2019-12-13 11:27:27
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I am new to django-allauth. I have successfully login from facebook using djang0-allauth. But I try to logout using '/accounts/logout' . It is also successfully logged out my application. But my problem is at the same time facebook not logged out(i.e; facebook not session expired.). Please solve my problem.

Error while confirm by the mail

拈花ヽ惹草 提交于 2019-12-12 12:44:02
问题 TemplateResponseMixin requires either a definition of 'template_name' or an implementation of 'get_template_names()' Url: from allauth.account.views import confirm_email as allauthemailconfirmation url(r'^rest-auth/', include('rest_auth.urls')), url(r'^rest-auth/registration/account-confirm-email/(?P<key>\w+)/$', allauthemailconfirmation, name="account_confirm_email"), url(r'^rest-auth/registration/', include('rest_auth.registration.urls')), I just read about this, but I don't understand how

Prevent social account creation in allauth

丶灬走出姿态 提交于 2019-12-12 09:43:51
问题 Is it possible to prevent account creation under certain circumstances in allauth, preferably using the pre_social_login signal? 回答1: With the current development branch you can easily do this. In your settings: SOCIALACCOUNT_ADAPTER = 'my.adapter.MySocialAccountAdapter' Then use this adapter.py: from django.http import HttpResponse from allauth.socialaccount.adapter import DefaultSocialAccountAdapter from allauth.exceptions import ImmediateHttpResponse class MySocialAccountAdapter

Django-allauth loads wrong base.html template

断了今生、忘了曾经 提交于 2019-12-12 08:44:53
问题 I've been trying to get django-allauth working for a couple days now and I finally found out what was going on. Instead of loading the base.html template that installs with django-allauth, the app loads the base.html file that I use for the rest of my website. How do i tell django-allauth to use the base.html template in the virtualenv/lib/python2.7/sitepackages/django-allauth directory instead of my project/template directory? 回答1: Unless called directly, your base.html is an extension of

Override signup view django-allauth

对着背影说爱祢 提交于 2019-12-12 08:35:04
问题 I am asking user to fill extra fields with custom form. And in one of the fields, I have to let user choose multiple hierarchical tags. For this, I need to pass the tags from a view to the template signup.html from classes.Tags import Tags from django.shortcuts import render_to_response from allauth.socialaccount import views as signup_views def signup_view(request): tags = Tags() parameters={} all_tags = tags.get_tags() parameters['all_tags'] = all_tags response = signup_views.signup(request

No module named 'allauth.account.context_processors'

可紊 提交于 2019-12-12 07:14:43
问题 I want to use Django-Allauth, so I installed as following and it works perfectly in my laptop localhost; but when I pull it in my server, I encounter with the following error: No module named 'allauth.account.context_processors' What should I do? # Django AllAuth TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [os.path.join(BASE_DIR, 'templates')], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ # Already defined Django-related contexts here #