django-allauth

Over-riding Django-allauth login/ registration urls with custom url/ pages

Deadly 提交于 2019-12-03 08:39:38
I have configured django-allauth for login through Facebook, Twitter and Google. However, django-allauth accepts login request only at /accounts/login/ , sign up request only at /accounts/signup/ etc. I have a modal form for login and registration on my home page and I want to use only that. How do I use django-allauth system to allow login ( both social and custom)/ registration etc from the modal form on my home page? I'm looking for mechanism to override django-allauth's urls and substitute them with my pages/ urls. The code is here The modal form HTML is here . This question is perhaps

django-allauth: How to set user to active only after e-mail verification

柔情痞子 提交于 2019-12-03 08:34:08
I'm using django-allauth primarily as a way to create user accounts for the admin backend. What I would like to have happen is: 1) When a user goes through the sign up procedure, send out the verification e-mail (I have this working so far) and set the user as inactive, staff, and with the "SurveyManager" group assigned to them by defult. Currently, the user is created with active set to true, staff set to false, and no groups assigned. 2) After clicking the link in their e-mail to verify their address, I'd like the user to be set to active, so they can then log in through the admin backend.

django-allauth logging in with Facebook token from iOS Device

无人久伴 提交于 2019-12-03 06:10:04
问题 I am using the Facebook iOS SDK to POST the Facebook Access Token to my Django server URI. The corresponding views.py function is shown below and I get a 200 Response code when I do the POST from iOS. However, I have a second @login_required decorated URI that I call from the iOS Device immediately afterword which considers me not logged in and redirects me to my main page. What am I doing wrong? How do I 'stay' logged in after my successful POST from iOS? # For POSTing the facebook token

django allauth facebook redirects to signup when retrieved email matches an existing user's email?

我是研究僧i 提交于 2019-12-03 03:47:30
问题 I am successfully able to login via Google and Facebook using Django (1.6.4) and allauth (0.16.1) and Python (2.7) with expected redirect to settings.LOGIN_REDIRECT_URL in case when there isn't a existing user with emailid retrieved from provider. However, when there already exists an user with same emailid as the one retrieved from provider (fb or goolge), it always redirects to /accounts/social/signup/# = signup page asking: You are about to use your Facebook/Google account to login to

Multiple signup, registration forms using django-allauth

邮差的信 提交于 2019-12-03 03:40:31
The application I am working on needs a separate login for 2 different type of users. We need "clients" and "business" owners to be able to register. For the "business" owner all that I need to do is set the boolean user.is_business to True I have used ACCOUNT_SIGNUP_FORM_CLASS with a separate class that sets the boolean to true and that works like a charm. But then the client login doesn't work anymore. Is there a way to create a separate signup view for a different user? I have tried the following class BusinessUserRegistrationView(FormView): form_class = BusinessSignupForm template_name =

django-allauth - Overriding default signup form

我们两清 提交于 2019-12-03 03:33:47
I'm using this code (in forms.py) for my custom signup form for allauth: class RegistrationForm(UserCreationForm): birth_date = forms.DateField(widget=extras.SelectDateWidget(years=BIRTH_DATE_YEARS)) class Meta: model = get_user_model() fields = ('username', 'email', 'password1', 'password2', 'first_name', 'last_name', 'gender', 'birth_date', 'city', 'country') I have of course specified ACCOUNT_SIGNUP_FORM_CLASS in settings.py to point to this form and it displays the fields which I've put in it. However, it does not work on submission, even if I put signup method it never gets invoked. I've

override django-allauth default forms

空扰寡人 提交于 2019-12-03 00:42:42
I want to override the default forms of django-allauth in order to change\add default widget attributes, class variables without changing the initial code of allauth form. How can I do that? My workspace: 1) installed django-allauth, as a package through pip; 2) configured settings, according to the recommendations of the project on github; 3) locally created templates signin, signup; 4) created forms.py, which defines a child class forms django-allauth from allauth.account import SigninForm class mySigninForm (SigninForm): username = ...//override variable Is this right way? Thanks! If you'd

Django allauth example [Errno 61] Connection refused

被刻印的时光 ゝ 提交于 2019-12-02 23:22:58
I have the following error when I run django allauth example and it tries to send an email: File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 571, in create_connection raise err error: [Errno 61] Connection refused Under OS X 10.9.1 arthur.sw From allauth documentation : When I sign up I run into connectivity errors (connection refused et al) You probably have not got an e-mail (SMTP) server running on the machine you are developing on. Therefore, allauth is unable to send verification mails. You can work around this by adding the following line to

Connect facebook phonegap login with django allauth

走远了吗. 提交于 2019-12-02 20:56:50
I'm building up an app that should allow the user to sign up / sign in with Facebook and then he should be able to login (always via Facebook ) to the "main" website To be honest it's a bit more complicated than this. That's because I'm using django-tastypie and django-allauth in the main website to allow sign up, login, and browsing of our API Basically I want to make the mobile app user browse the tastypie API (accessible only if logged and if you're an user in the main website) and grant him the rights to add rows (like orders) Here's what I have A phonegap app with a working Facebook login

django-allauth logging in with Facebook token from iOS Device

人走茶凉 提交于 2019-12-02 19:34:41
I am using the Facebook iOS SDK to POST the Facebook Access Token to my Django server URI. The corresponding views.py function is shown below and I get a 200 Response code when I do the POST from iOS. However, I have a second @login_required decorated URI that I call from the iOS Device immediately afterword which considers me not logged in and redirects me to my main page. What am I doing wrong? How do I 'stay' logged in after my successful POST from iOS? # For POSTing the facebook token from django.views.decorators.csrf import csrf_exempt from allauth.socialaccount import providers from