File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -415,8 +415,12 @@ Miscellaneous
415
415
``pk`` parameter in ``params`` for backwards compatibility.
416
416
417
417
* ``UserCreationForm.errors_messages['duplicate_username']`` is no longer used.
418
- If you wish to customize that error message, use
419
- ``User.error_messages['unique']`` instead.
418
+ If you wish to customize that error message, :ref:`override it on the form
419
+ <considerations-regarding-model-errormessages>` using
420
+ ``Meta.errors_messages['unique']`` or, if you have a custom user model, use
421
+ the ``'unique'`` key in the :attr:`~django.db.models.Field.error_messages`
422
+ option of the field designated by
423
+ :attr:`~django.contrib.auth.models.CustomUser.USERNAME_FIELD`.
420
424
421
425
.. _deprecated-features-1.8:
422
426
You can’t perform that action at this time.
0 commit comments