Fix token param in force_authenticate example

related_name for Token is `auth_token`, not `token`.
This commit is contained in:
Oliver Eidel 2017-07-19 17:46:33 +02:00 committed by GitHub
parent 2d4226c2bd
commit 1b24199778

View File

@ -82,7 +82,7 @@ For example, when forcibly authenticating using a token, you might do something
user = User.objects.get(username='olivia')
request = factory.get('/accounts/django-superstars/')
force_authenticate(request, user=user, token=user.token)
force_authenticate(request, user=user, token=user.auth_token)
---