Skip to content

Commit 7c04917

Browse files
zsoldospbluetech
authored andcommitted
django_username_field example should use create_user not create
so that the password is hashed and `client.login` etc. works as expected
1 parent 0b42a93 commit 7c04917

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/helpers.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ Example
311311
::
312312

313313
def test_new_user(django_user_model):
314-
django_user_model.objects.create(username="someone", password="something")
314+
django_user_model.objects.create_user(username="someone", password="something")
315315

316316
.. fixture:: django_username_field
317317

0 commit comments

Comments
 (0)