django-allauth

password field is showing password in plain text

[亡魂溺海] 提交于 2019-12-24 08:19:44
问题 I have used django allauth for user registration and login system. I could show the form by simplifying the lines of code using for loop. I got the right field type(TextInput and PasswordInput) for each field too. However the password field which has PasswordInput shows password in plain text. How can i resolve this? my signup page(account/signup.html) <form class="signup" id="signup_form" method="post" action="{% url 'account_signup' %}"> {% csrf_token %} {% for field in form.visible_fields

How can I get the django allauth signup page to show up without being at the /accounts/login url?

大憨熊 提交于 2019-12-24 00:28:33
问题 A lot of websites such as pinterest, facebook, and tumblr have their signup page at their home page. Is it possible to get the allauth login page to show on the home page rather than the /accounts/login page? 回答1: Sure can! Just route whichever url you want to go to the allauth login view from django.conf.urls import patterns, include, url from main import views from allauth.account import views as allauthviews urlpatterns = patterns('', url(r'^$', allauthviews.login), url(r'^someurl/$',

ImportError: cannot import name RemovedInDjango19Warning

佐手、 提交于 2019-12-23 08:55:16
问题 I'm on Django 1.8.7 and I've just installed Django-Allauth by cloning the repo and running pip install in the app's directory in my webapp on the terminal. Now when I run manage.py migrate, I get this error: ➜src git:(master) ✗ python manage.py migrate Traceback (most recent call last): File "manage.py", line 8, in <module> from django.core.management import execute_from_command_line File "/Library/Python/2.7/site-packages/django/core/management/__init__.py", line 10, in <module> from django

django - allauth and rest-auth facebook login token does not work with JWT authentication

淺唱寂寞╮ 提交于 2019-12-23 05:38:05
问题 I've followed the both packages documentations and using example from rest-auth doc. I've followed all the steps and I can successfully use this API to register/login user with facebook. API returns me token and user object but this token is not working with JWT authentication. But if I set this user's username in the db and then post the facebook login request again then returned token works fine. What does this social authentication process has to do with username? Is there something I need

Django allauth custom login form not rendering all fields in custom user model

这一生的挚爱 提交于 2019-12-23 02:46:11
问题 I am trying to implement login of that consists a custom user model. Is it possible to inherit from allauth.account.forms.LoginForm and add a custom field to the custom login form? Idea is to assign user with a role at the time of login by overriding login() method. I have followed allauth configuration and mentioned what forms to use for login in settings.py with following code AUTH_USER_MODEL = 'core.User' ACCOUNT_SIGNUP_FORM_CLASS = 'core.forms.SignupForm' ACCOUNT_FORMS = {'login': 'core

django-allauth - Send email verification using Gmail account

╄→尐↘猪︶ㄣ 提交于 2019-12-22 09:55:16
问题 I have setup allauth to send out an email for every new registered user so that their email can be verified. Right now I use the email_backend so that the email is sent to the terminal instead, and everything works fine. But now I want to can set it all up so that an email is sent, and since I will (likely) not have a local email server at the host server, but instead use for example an gmail account to send the verification email. Is this at all possible? 回答1: Of course you can set your

Customizing Django allauth's socialaccount signup form: adding password fields

有些话、适合烂在心里 提交于 2019-12-22 08:44:02
问题 I'm trying to modify the signup form which the user is shown when logging in from a socialaccount provider. Here's me custom signup form code: from allauth.socialaccount.forms import SignupForm from allauth.account.forms import SetPasswordField, PasswordField class SocialPasswordedSignupForm(SignupForm): password1 = SetPasswordField(label=_("Password")) password2 = PasswordField(label=_("Password (again)")) def confirm_password(self): print('entered confirm_password') if ("password1" in self

Login / register using phone or email for django, allauth integration

一个人想着一个人 提交于 2019-12-22 07:27:27
问题 I want to modify my django user model to allow phone or email registration / login. Using USERNAME_FIELD = 'identifier' If the user registers with phone number, the identifier will be its phone number, or email, vice versa. (If anyone think I should just assign some number as the identifier, let me know.) Here is my accounts.models: from django.db import models from django.contrib.auth.models import AbstractBaseUser, PermissionsMixin, BaseUserManager from phonenumber_field.modelfields import

Reverse for 'account_email_verification_sent' not found. 'account_email_verification_sent' is not a valid view function or pattern name

亡梦爱人 提交于 2019-12-22 05:33:15
问题 I'm trying to use allauth and rest-auth in my project and try to use the built-in function in allauth to do email verification but this what I get : and here is my code settings.py ACCOUNT_EMAIL_VERIFICATION = 'mandatory' ACCOUNT_EMAIL_REQUIRED = True urls.py urlpatterns = [ re_path(r'^', include('rest_auth.urls')), re_path(r'^registration/', include('rest_auth.registration.urls')), ] 回答1: I found the solution, that I have to add URL to be able to make a post request to the backend to send

django allauth facebook local development

孤人 提交于 2019-12-21 18:00:08
问题 I'm using django-allauth for Facebook authentication in developement for a site and have set up accordingly: within the facebook app settings on facebok: Namespace: test_login App Domains: blank Site URL: http://127.0.0.1:8000/ Canvas URL: http://127.0.0.1:8000/ Secure Canvas URL: https://127.0.0.1:8000/ in Django admin I created new Social app: Provider: Facebook name: test_login client_id: xxx Secret: xxx Sites: http://127.0.0.1:8000/ as you can see I added a new site http://127.0.0.1:8000/