﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
36121	Allow customization of password_change_form in the Django admin site	Mohammadreza Eskandari		"The Django admin site currently provides the ability to customize the login_form through the AdminSite.login_form attribute. However, no similar mechanism exists to customize the password_change_form used in the admin for password changes.

This inconsistency limits flexibility for developers who want to provide custom logic or fields for password changes in the admin interface. For example, a developer may want to enforce additional security checks, integrate password strength validation, or provide a more user-friendly design.

**Proposed Solution:
**Introduce a new attribute, AdminSite.password_change_form, which developers can override to specify a custom form for the password change functionality. This attribute would function similarly to AdminSite.login_form, allowing developers to define and register a custom form class.

**Benefits:
**\\
- Enhances consistency with existing AdminSite customization options.
- Provides more flexibility for developers working with the Django admin site.
- Simplifies the implementation of custom password change logic.

**Example:**
{{{
from django.contrib.admin import AdminSite
from myapp.forms import CustomPasswordChangeForm

class MyAdminSite(AdminSite):
    password_change_form = CustomPasswordChangeForm

}}}

**Potential Backwards Compatibility Issues:
**The proposed change should not introduce any breaking changes, as the default behavior would remain unchanged unless password_change_form is explicitly set.

**My Contribution:
**I have submitted a pull request which is available at https://github.com/django/django/pull/19081

"	New feature	new	contrib.admin	5.1	Normal		password_change, admin_site	Mohammadreza Eskandari	Unreviewed	1	0	0	0	0	0
