django-allauth

Unable to override django-allauth templates

删除回忆录丶 提交于 2021-02-20 18:50:46
问题 I'm trying to override the default django-allauth templates. I've copied the templates from the allauth folder in my site-packages to my applications template directory. The structure is as follows myapp --templates ----account ----admin ----socialaccount ----www ----base.html My settings.py has the TEMPLATE_DIRS set TEMPLATE_DIRS = ( os.path.join(BASE_DIR, "templates"), ) As per this answer I'm loading my application before allauth. Making any changes to the templates in my directory doesn't

Unable to override django-allauth templates

萝らか妹 提交于 2021-02-20 18:50:13
问题 I'm trying to override the default django-allauth templates. I've copied the templates from the allauth folder in my site-packages to my applications template directory. The structure is as follows myapp --templates ----account ----admin ----socialaccount ----www ----base.html My settings.py has the TEMPLATE_DIRS set TEMPLATE_DIRS = ( os.path.join(BASE_DIR, "templates"), ) As per this answer I'm loading my application before allauth. Making any changes to the templates in my directory doesn't

How to prevent usernames from containing @/./+/-/_.?

不打扰是莪最后的温柔 提交于 2021-02-17 07:00:07
问题 I'm using django-allauth, and for some reason the username default allows: "letters, digits and @/./+/-/_." How can I ensure usernames are strictly alphanumeric (without @/./+/-/_. )? I'm already using this clean_username() validator which currently works: class UsernameMaxAdapter(DefaultAccountAdapter): def clean_username(self, username): exclude = ['@', '/', '.', '+', '-', '/', '_', ','] if len(username) > 20: raise ValidationError("Username can't be over 20 characters") for i in exclude:

How to implement django-allauth in homepage as modal?

匆匆过客 提交于 2021-02-09 10:56:34
问题 There are few questions based on this idea like: Implementing Ajax requests / response with django-allauth Log in / Sign up directly on home page https://www.reddit.com/r/django/comments/30lz11/django_allauth_implement_loginsignup_on_homepage/ but I need a little more help. I understand that I have to make form action url of modal as {% url 'account_login' %} . I have included {% load account %} and changed the 'name' and 'id' of username and password fields. My question is what other things

How to implement django-allauth in homepage as modal?

浪尽此生 提交于 2021-02-09 10:54:31
问题 There are few questions based on this idea like: Implementing Ajax requests / response with django-allauth Log in / Sign up directly on home page https://www.reddit.com/r/django/comments/30lz11/django_allauth_implement_loginsignup_on_homepage/ but I need a little more help. I understand that I have to make form action url of modal as {% url 'account_login' %} . I have included {% load account %} and changed the 'name' and 'id' of username and password fields. My question is what other things

How to implement django-allauth in homepage as modal?

陌路散爱 提交于 2021-02-09 10:53:55
问题 There are few questions based on this idea like: Implementing Ajax requests / response with django-allauth Log in / Sign up directly on home page https://www.reddit.com/r/django/comments/30lz11/django_allauth_implement_loginsignup_on_homepage/ but I need a little more help. I understand that I have to make form action url of modal as {% url 'account_login' %} . I have included {% load account %} and changed the 'name' and 'id' of username and password fields. My question is what other things

django-rest-auth handling expired confirmation email

孤人 提交于 2021-02-08 12:11:48
问题 I am using django-rest-auth and django-allauth to handle user authentication in my rest api. When a user tries to verify their email after the link has expired, I get an unpleasant error page. Please, how can I display a better error page or send a message telling them it wasn't successful because the link had expired? 回答1: As far as I can understand, your error is coming from django-allauth , not from your project. Reason for the error is that you did not include allauth.url in your main

How to override django allauth email templates

这一生的挚爱 提交于 2021-02-07 03:01:25
问题 I'm using allauth version 0.35.0 and I want to override email templates to make my desired HTML template for them. No problem with allauth login and SignUp and etc. pages But I can't find any template for emails. It's just a .txt file in path /templates/account/email/ . But How can I set HTML message for allauth tasks like changing password and etc. for their email messages? Any help will be appreciated. 回答1: Ooops! Shame on me! in this part of allauth documentation This said that: Emails

How to override django allauth email templates

笑着哭i 提交于 2021-02-07 03:00:09
问题 I'm using allauth version 0.35.0 and I want to override email templates to make my desired HTML template for them. No problem with allauth login and SignUp and etc. pages But I can't find any template for emails. It's just a .txt file in path /templates/account/email/ . But How can I set HTML message for allauth tasks like changing password and etc. for their email messages? Any help will be appreciated. 回答1: Ooops! Shame on me! in this part of allauth documentation This said that: Emails

Django Allauth signup form not saving custom fields

谁都会走 提交于 2021-01-29 06:39:53
问题 I'm trying to do something that should be very simple: adding a field to signup and saving it to my user object. I am using allauth, so the way this is supposed to be done as far as I can tell is by modifying the allauth form for signup. I've followed the instructions here: How to customize user profile when using django-allauth: This is what my forms.py looks like: from allauth.account.forms import SignupForm from django import forms UNASSIGNED = 'NA' CLIENT = 'CL' USER_TYPE_CHOICES = (