django-allauth

django-allauth: rearrange form fields (change order)

…衆ロ難τιáo~ 提交于 2019-12-04 09:02:46
I am trying to use django-allauth for user registrations. I have this form class UserProfileForm(forms.ModelForm): class Meta: model = UserProfile fields = ('gender', 'country', 'city', 'birth_date', 'has_accepted_tos') and as per instructions I have set in my settings.py ACCOUNT_SIGNUP_FORM_CLASS = "userprofile.forms.UserProfileForm" The problem is that when the form is rendered my custom form asking for gender, country etc is rendered on top and then the standard User fields that ask for username, email and password. Something in this order: gender country city birth_date has_accepted_tos

SMTPDataError at /accounts/signup/ (553, b'Relaying disallowed as webmaster@localhost')

感情迁移 提交于 2019-12-04 03:53:06
问题 I am using Django 1.7 and for authentication I am using Django allauth. For sending email, I started using zoho smtp server. It is able to send normal & transactional mails but it cannot send signup conversation email. It shows the error: SMTPDataError at /accounts/signup/ (553, b'Relaying disallowed as webmaster@localhost') The traceback is : 69. return self.dispatch(request, *args, **kwargs) File "C:\Python34\lib\site-packages\django\utils\decorators.py" in _wrapper 29. return bound_func(

Override signup view django-allauth

蹲街弑〆低调 提交于 2019-12-04 03:46:55
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) return response And in urls.py, I added this line before the allauth urls include line. url(r'

Django rest registration

安稳与你 提交于 2019-12-03 20:20:42
I am using Django-rest-auth ( https://github.com/Tivix/django-rest-auth ) in my django project for login and registration. I see a default registration form as follows: Currently I am being able to register a new user with email instead of username. The default auth_user table in my MySql database has following columns: (id, password,last_login, is_superuser, username, first_name, last_name, email, is_staff, is_active, date_joined) My settings.py : INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib

django-allauth: custom user generates IntegrityError at /accounts/signup/ (custom fields are nulled or lost)

陌路散爱 提交于 2019-12-03 20:15:02
问题 I'm trying to integrate django-allauth with a custom user model (subclassed AbstractUser, but when I test the signup form I get an integrity error due to field (date_of_birth) being null, but the value submitted was u'1976-4-6' I'm learning the new custom user stuff, as well as class-based views as I'm learning django-allauth, so I'm confident that I'm doing something wrong, but after a couple days of reading the github issues, the few tutorials, readthedocs, and stackoverflow questions I

Django 1.10.1 'my_templatetag' is not a registered tag library. Must be one of:

送分小仙女□ 提交于 2019-12-03 18:55:26
问题 I want a menu thats custom depending which group you are member of. Im using Django 1.10.1, allauth and so on. When im trying to make my templatetag it fails and it says:¨ TemplateSyntaxError at / 'my_templatetag' is not a registered tag library. Must be one of: account account_tags admin_list admin_modify admin_static admin_urls cache i18n l10n log socialaccount socialaccount_tags static staticfiles tz 'my_templatetag.py' looks like this: from django import template from django.contrib.auth

Django allauth not sending links with https

我的未来我决定 提交于 2019-12-03 16:35:17
I want Django Allauth to send links like the confirm e-mail or reset password with https : Something like this: https://example.com/ca/accounts/confirm-email/picuwfpjpptjswi50x5zb4gtsqptmwkscea445kadnbsfwcyij3fdnblery4onuq/ According to the official documentation only changing the following setting in settings.py it should work: ACCOUNT_DEFAULT_HTTP_PROTOCOL = "https" But I keep getting the links with http instead of https like this: http://example.com/ca/accounts/confirm-email/picuwfpjpptjswi50x5zb4gtsqptmwkscea445kadnbsfwcyij3fdnblery4onuq/ Am I missing something? Thank you! Timmy O'Mahony

Multiple signup, registration forms using django-allauth

╄→гoц情女王★ 提交于 2019-12-03 13:38:37
问题 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

django 1.9: ProgrammingError: relation “users_user” does not exist

好久不见. 提交于 2019-12-03 12:07:42
I am running into a ProgrammingError when doing migrate, I think it may be related to the use of django-allauth with a custom user. Here is what I do 1/ Create a fresh database with psql: create database dj_example; 2/ Installed_apps contain django.contrib.sites: DJANGO_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.admin', ) THIRD_PARTY_APPS = ( 'crispy_forms', # Form layouts 'allauth', # registration 'allauth.account', # registration #'allauth

How to save extra fields on registration using custom user model in DRF + django-rest-auth

限于喜欢 提交于 2019-12-03 08:58:21
Using Django REST Framework (DRF), with django-rest-auth, I created a custom user model with one extra field. My aim is to use the django-rest-auth registration endpoint to register a new user in one request, and thus sending all the data to create a new user, including the data for the extra field. I am using AbstractUser, since it seems recommended for beginners, where more advanced developers could use AbstractBaseUser. This is also why the following SO answers looks too complicated for what I want to achieve: link here . I know this question has been asked multiple times, but the answers