Skip to content

Commit

Permalink
django_username_field example should use create_user not create
Browse files Browse the repository at this point in the history
so that the password is hashed and `client.login` etc. works as expected
  • Loading branch information
zsoldosp authored and bluetech committed Jan 30, 2024
1 parent 0b42a93 commit 7c04917
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/helpers.rst
Expand Up @@ -311,7 +311,7 @@ Example
::

def test_new_user(django_user_model):
django_user_model.objects.create(username="someone", password="something")
django_user_model.objects.create_user(username="someone", password="something")

.. fixture:: django_username_field

Expand Down

0 comments on commit 7c04917

Please sign in to comment.