Skip to content

Commit bf4b3ff

Browse files
olieideltomchristie
authored andcommitted
Fix token param in force_authenticate example (encode#5284)
related_name for Token is `auth_token`, not `token`.
1 parent 52e0f3a commit bf4b3ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/api-guide/testing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ For example, when forcibly authenticating using a token, you might do something
8282

8383
user = User.objects.get(username='olivia')
8484
request = factory.get('/accounts/django-superstars/')
85-
force_authenticate(request, user=user, token=user.token)
85+
force_authenticate(request, user=user, token=user.auth_token)
8686

8787
---
8888

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy