From fba5d3b6e63fe4a07b1aa133186f997eeebf9aeb Mon Sep 17 00:00:00 2001 From: aryan Date: Thu, 20 Feb 2020 23:46:59 +0530 Subject: Fixed #31289 -- Added hint for USERNAME_FIELD/REQUIRED_FIELDS system check. --- tests/auth_tests/test_checks.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests') diff --git a/tests/auth_tests/test_checks.py b/tests/auth_tests/test_checks.py index dbcfefcbb7..cfaa4063f8 100644 --- a/tests/auth_tests/test_checks.py +++ b/tests/auth_tests/test_checks.py @@ -49,6 +49,10 @@ class UserModelChecksTests(SimpleTestCase): checks.Error( "The field named as the 'USERNAME_FIELD' for a custom user model " "must not be included in 'REQUIRED_FIELDS'.", + hint=( + "The 'USERNAME_FIELD' is currently set to 'username', you " + "should remove 'username' from the 'REQUIRED_FIELDS'." + ), obj=CustomUserBadRequiredFields, id='auth.E002', ), -- cgit v1.3