1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Fixed #34187 -- Made UserCreationForm save many-to-many fields.

This commit is contained in:
sdolemelipone
2022-11-27 19:49:02 +00:00
committed by Mariusz Felisiak
parent 60a7bd8986
commit 9d726c7902
5 changed files with 35 additions and 0 deletions

View File

@@ -840,6 +840,11 @@ extend these forms in this manner::
model = CustomUser
fields = UserCreationForm.Meta.fields + ('custom_field',)
.. versionchanged:: 4.2
In older versions, :class:`~django.contrib.auth.forms.UserCreationForm`
didn't save many-to-many form fields for a custom user model.
Custom users and :mod:`django.contrib.admin`
--------------------------------------------