mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-03 20:10:10 +03:00
Merge 6952b965c2
into a7ff51118f
This commit is contained in:
commit
74add5bde7
|
@ -126,6 +126,15 @@ To use the `TokenAuthentication` scheme you'll need to [configure the authentica
|
|||
'rest_framework.authtoken'
|
||||
)
|
||||
|
||||
Also you need to enable `TokenAuthentication` from `rest_framework.authentication`in the `REST_FRAMEWORK['DEFAULT_AUTHENTICATION_CLASSES` list:
|
||||
|
||||
REST_FRAMEWORK = {
|
||||
'DEFAULT_AUTHENTICATION_CLASSES': (
|
||||
...
|
||||
'rest_framework.authentication.TokenAuthentication',
|
||||
...
|
||||
)}
|
||||
|
||||
Make sure to run `manage.py syncdb` after changing your settings. The `authtoken` database tables are managed by south (see [Schema migrations](#schema-migrations) below).
|
||||
|
||||
You'll also need to create tokens for your users.
|
||||
|
|
Loading…
Reference in New Issue
Block a user