django-allauth

Custom users with django allauth

[亡魂溺海] 提交于 2019-12-11 00:04:26
问题 I am trying to use a custom user with django-allauth/social auth In settings.py, I have AUTHENTICATION_BACKENDS = ( # Needed to login by username in Django admin, regardless of `allauth` "django.contrib.auth.backends.ModelBackend", # `allauth` specific authentication methods, such as login by e-mail "allauth.account.auth_backends.AuthenticationBackend", ) SOCIALACCOUNT_PROVIDERS = \ {'facebook': {'SCOPE': ['email', 'user_likes', 'user_status', 'user_about_me', 'basic_info', 'read_stream'],

django allauth not working on production

旧城冷巷雨未停 提交于 2019-12-10 20:13:47
问题 I can't login or signup on my production server. Configuration is same for local and development server. I used same settings for both of them, same requirements installed in order to identify what's wrong but no hope. python manage.py check System check identified no issues (0 silenced). some of related configuration SITE_ID = 1 from django.core.urlresolvers import reverse_lazy LOGIN_REDIRECT_URL = reverse_lazy('amazon_advertising:home') LOGIN_URL = reverse_lazy('account_login') LOGOUT_URL =

django-allauth Uncaught ReferenceError

主宰稳场 提交于 2019-12-10 20:07:01
问题 I cannot work out why I am getting: Uncaught ReferenceError: allauth is not defined ...when clicking the Facebook link at: https://obscure-harbor-7751.herokuapp.com/accounts/signup/ hosted on Heroku. There is no related javascript rendered to the page, but I don't know where allauth would handle that from. I'm quite sure that all relevant settings are correct (pasted below). I think it was working before and somehow stopped working of late (possibly due to an update pulled as a requirement on

Using Google App Engine's Mail API for django-allauth email

落爺英雄遲暮 提交于 2019-12-10 17:55:34
问题 I'm working on a project hosted on Google App Engine, and using Django-allauth for my user system. Right now I'm just using the following setup in settings.py EMAIL_USE_TLS = True EMAIL_HOST = 'smtp.gmail.com' EMAIL_PORT = 587 EMAIL_HOST_USER = DEFAULT_FROM_EMAIL = 'myMail@gmail.com' EMAIL_HOST_PASSWORD = 'password' But I would like to use GAE's Mail API instead, so that I can take use of all the quotas available. To send an email with GAE's API I can do as follows: sender_address = "myMail

django-allauth returns error Reverse for 'account_confirm_email' with arguments '()' and keyword arguments '{}' not found

被刻印的时光 ゝ 提交于 2019-12-10 16:13:11
问题 I am using django-allauth along with django rest-auth. here is the stacktrace: [2016-02-15 23:45:35,093] ERROR [base:handle_uncaught_exception:256 8977] Internal Server Error: /api/rest-auth/registration/ Traceback (most recent call last): File "/home/.../webapps/project_test/lib/python2.7/Django-1.8.7-py2.7.egg/django/core/handlers/base.py", line 132, in get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/home/.../webapps/project_test/lib/python2.7

Django allauth Redirect after social signup

て烟熏妆下的殇ゞ 提交于 2019-12-10 15:05:29
问题 I would like to redirect to a certain link after social signup, how and where do I do that? I can do it for regular signup but I can't for social signup. 回答1: Alternatively you can write your own custom social account adapter to handle different logged in redirection from different social accounts and not messing with your normal account settings, like so: # adapter.py from allauth.socialaccount.adapter import DefaultSocialAccountAdapter class SocialAccountAdapter(DefaultSocialAccountAdapter)

Migration error with Django 1.7.1

家住魔仙堡 提交于 2019-12-10 13:39:26
问题 I'm getting an error when performing a migration after introducing a new app (django-allauth). I'm not sure what else to try in order to fix the error. I've tried a few things but they don't seem to help unfortunately. when running manage.py migrate : File "D:\Python27\Lib\site-packages\django\db\migrations\state.py", line 71, in render raise InvalidBasesError("Cannot resolve bases for %r\nThis can happen if you are inheriting models from an app with migrations (e.g. contrib.auth)\n in an app

How to fix 'Social Network Login Failure' error of django-allauth deployed on Elastic Beanstalk

喜你入骨 提交于 2019-12-10 12:11:56
问题 I'm using django-allauth plugin to provide Facebook login in my application. The login works perfectly on my machine (localhost:8000) but it gives me this error when I try to login in the online version, deployed on Elastic Beanstalk (AWS): Social Network Login Failure An error occurred while attempting to login via your social network account. I've tried to debug it to get more information following this instructions: Debugging django-allauth Social Network Login Failure, but it gives no

Django allauth - set facebook redirect

天大地大妈咪最大 提交于 2019-12-10 09:29:41
问题 In my app I have a "?next" param so when a user logs in they will be redirected to where they came from. example www.mysite.com/login/?next=www.mysite.com/some-section/ I am using django-allauth for Facebook registration. When a user logs in they are redirected to the url specified in settings.py (settings.LOGIN_REDIRECT_URL) Is there a way to pass in the redirect url for example like so: <a class="button-facebook" href="{% provider_login_url "facebook" method="oauth2" next=redirecturl

django-allauth set username the same as email

荒凉一梦 提交于 2019-12-10 03:14:48
问题 I have a sign up form which asks only for email and password. When a user signs up, django-allauth creates a username for that user by striping the "@email" suffix form the user's email address. So for example, if a user signs up with " some-user@example.com " his username will be " some-user " and if another user signs up with " some-user@gmail.com " then his username will be " some-userr " But what I want is the username and email of the users to have the same value. So how can I configure