django-authtools uses a custom UserForm to display a friendlier password field to users.
|
class UserChangeForm(DjangoUserChangeForm): |
|
def __init__(self, *args, **kwargs): |
|
super(UserChangeForm, self).__init__(*args, **kwargs) |
|
password = self.fields.get('password') |
|
if password: |
|
password.widget = BetterReadOnlyPasswordHashWidget() |
BetterReadOnlyPasswordHashWidget relies on context["summary"], but this was removed in Django 6.0. The result is that accessing a user detail page in the admin crashes the site:
/venv/lib/python3.13/site-packages/authtools/forms.py:37: in get_context
if any(item.get('value') for item in context['summary']):
^^^^^^^^^^^^^^^^^^
E KeyError: 'summary'
The workaround is to create a custom admin class for users that sets form=DjangoUserChangeForm.
django-authtools uses a custom
UserFormto display a friendlier password field to users.django-authtools/authtools/forms.py
Lines 42 to 47 in cceb54a
BetterReadOnlyPasswordHashWidgetrelies oncontext["summary"], but this was removed in Django 6.0. The result is that accessing a user detail page in the admin crashes the site:The workaround is to create a custom admin class for users that sets
form=DjangoUserChangeForm.