-
Notifications
You must be signed in to change notification settings - Fork 241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New "Password-based authentication" form field displays in Django 5.1 #245
Comments
Looks like this is the cause of the bug: django-registration/src/django_registration/forms.py Lines 24 to 28 in b5ce7d0
That class inherits from |
I used this workaround in my own project for the moment: diff --git a/core/views.py b/core/views.py
index 0c8991d..b7c8d40 100644
--- a/core/views.py
+++ b/core/views.py
@@ -15,6 +15,7 @@ from django.contrib.admin.views.decorators import staff_member_required
from django.shortcuts import get_object_or_404, render
from django.conf import settings
from django.utils.safestring import mark_safe
+from django_registration.forms import RegistrationForm
from django_registration.backends.activation.views import (
RegistrationView as BaseRegistrationView,
)
@@ -174,10 +175,15 @@ def homepage(request):
return render(request, "homepage.html")
+class CustomRegisterForm(RegistrationForm):
+ usable_password = None
+
+
class RegistrationView(BaseRegistrationView):
template_name = "register.html"
email_subject_template = "register_activation_email_subject.txt"
email_body_template = "register_activation_email_body.txt"
+ form_class = CustomRegisterForm
def get(self, request, *args, **kwargs):
if request.user.is_authenticated: |
I'm already planning to give up on |
Also I feel like probably the Django docs should be updated to clarify that |
That sounds good to me. |
Opened an issue for that here: https://code.djangoproject.com/ticket/35678 |
Forum discussion: https://forum.djangoproject.com/t/the-purpose-of-usercreationform/33836 |
This is going to be fixed in Django |
WIP of removing django-registration's dependency on |
I upgraded to Django 5.1 and now my registration form looks like this:
That confusing "Password-based authentication" field is new - it looks like it was caused by this change to Django:
The text was updated successfully, but these errors were encountered: