django-allauth

django-allauth configuration doubts

血红的双手。 提交于 2019-11-29 14:52:02
问题 I'm using django-allauth with Django 1.5.1 and I have a few questions when setting it up: 1. Configure urls.py The docs says that you have to add the following to urls.py file: urlpatterns = patterns('', ... (r'^accounts/', include('allauth.urls')), ... ) The problem is that I already have a custom app called accounts and I already use the following URL pattern: (r'^accounts/', include('accounts.urls')), So I have a naming collision here with the accounts/ regex URL. My question is: can I

Debugging AllAuth: social account not logging user in despite connecting successfully

丶灬走出姿态 提交于 2019-11-29 14:16:26
Clicking the facebook login button in the login form correctly brings up the fb login popup, but after entering credentials the pop-up closes and nothing happens. Clicking the button again without reloading the pages confirms that the fb account is connected as browser console prints: FB.login() called when user is already connected. However no new entries appear in the user database, the user isn't redirected and is not signed in. So the problem appears to be with how AllAuth is handling things. There's no debug info appearing anywhere on the back-end though, making this somewhat difficult to

django allauth login & signup form on homepage

谁都会走 提交于 2019-11-29 07:46:29
I have been looking for a solution for some time now and I am not able to wrap my head around this. All I am trying to accomplish is to have the allauth login and signup form on the same page and on the homepage instead of under the /accounts urls. Does anyone have experience with that or has a solution they could share or point me in the right direction? Any help would be appreciated. First we take create a custom view using allauth's signup view from allauth.accounts.views import SignupView from allauth.accounts.forms import LoginForm class CustomSignupView(SignupView): # here we add some

decide where to go to after connecting with django-allauth

百般思念 提交于 2019-11-29 05:06:35
After connecting an account with a social app using django-allauth the user is redirected to accounts/social/connections . How can I change this behavior? pennersr If the user is adding more social accounts to his existing (local) account, then the most logical default would be indeed to redirect to the social account connections management screen. However, you can easily override the default by passing along a next parameter. Have a look here: https://github.com/pennersr/django-allauth/blob/master/allauth/socialaccount/helpers.py#L125 You'll see that the next parameter is checked, falling

django-allauth: Only allow users from a specific google apps domain

…衆ロ難τιáo~ 提交于 2019-11-29 04:52:16
I am a newbie at Django. Using django-allauth I have set up single click sign in. I obtained my domain credentials ( client_id and secret_key) from google api console. But the problem is django-allauth is letting me login from any google account while I want the email addresses to be restricted to my domain ( @example.com instead of @gmail.com) django-social-auth has the white listed domains parameter for this, how do I include this information in allauth? I found django-allauth much easier to set up after spending hours on django-social-auth Any help would be much appreciated. Answering my

django-allauth: how to properly use email_confirmed signal to set user to active

夙愿已清 提交于 2019-11-29 04:04:13
In another post , I mentioned that I was trying to use allauth's email_confirmed signal to change the is_active field on the confirmed user to true. However, the following code gave me the exception "User matching query does not exist." from allauth.account.signals import email_confirmed from django.dispatch import receiver from django.contrib.auth.models import User @receiver(email_confirmed) def email_confirmed_(request, email_address, **kwargs): user = User.objects.get(email=email_address) user.is_active = True user.save() I tried to re-work this, and still got a similar exception,

Django-allauth No Facebook app configured: please add a SocialApp using the Django admin

放肆的年华 提交于 2019-11-29 01:34:32
问题 I am trying to setup Django-allauth in my project. I am running into this error and am unable to fix it. Environment: Request Method: GET Request URL: `http://localhost:8000/accounts/login/` Django Version: 1.4.2 Python Version: 2.7.3 Installed Applications: ('django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'core', 'allauth', 'allauth.account', 'allauth.socialaccount', 'allauth

django-allauth: how to modify email confirmation url?

*爱你&永不变心* 提交于 2019-11-28 21:56:47
I'm running django on port 8001, while nginx is handling webserver duties on port 80. nginx proxies views and some REST api calls to Django. I'm using django-allauth for user registration/authentication. When a new user registers, django-allauth sends the user an email with a link to click. Because django is running on port 8001, the link looks like http://machine-hostname:8001/accounts/confirm-email/xxxxxxxxxxxxxx How can I make the url look like http://www.example.com/accounts/confirm-email/xxxxxxxx ? Thanks! Django get hostname and port from HTTP headers. Add proxy_set_header Host $http

django-allauth social account connect to existing account on login

拥有回忆 提交于 2019-11-28 21:41:59
I have a custom user model and I am using django-allauth for social registration and login. I am trying to connect existing user to new social account when a user login using a social account who already has registered using email. I found this link . def pre_social_login(self, request, sociallogin): user = sociallogin.account.user if user.id: return try: customer = Customer.objects.get(email=user.email) except Customer.DoesNotExist: pass else: perform_login(request, customer, 'none') But I'm getting an error when I try to login through social account. RelatedObjectDoesNotExist at /accounts

overriding default templates of django-allauth

ぐ巨炮叔叔 提交于 2019-11-28 21:11:02
I used this social registration/signup library django allauth for a project of mine. How do i customize the default templates and forms to give a better look and feel? the latest version of all-auth on github has its templates outside, however the one on Pypi is not, all you need to do is clone the repo in your project directory and override the templates. As simple as that. Assuming you have set a project level templates directory using the TEMPLATE_DIRS setting like: TEMPLATE_DIRS = (os.path.join(PROJECT_DIR, 'templates'),) You should be able to copy all of the folders shown here into that