mirror of
https://github.com/lemeow125/Django-NotesApp.git
synced 2025-05-16 11:38:11 +08:00
Added token auth
This commit is contained in:
parent
fa5bd13ca0
commit
41c77ae9ef
4 changed files with 10 additions and 2 deletions
|
@ -38,6 +38,7 @@ INSTALLED_APPS = [
|
|||
'django.contrib.messages',
|
||||
'django.contrib.staticfiles',
|
||||
'rest_framework',
|
||||
'rest_framework.authtoken',
|
||||
'notes.apps.NotesConfig',
|
||||
'corsheaders',
|
||||
'djoser'
|
||||
|
@ -132,6 +133,12 @@ CORS_ALLOWED_ORIGINS = [
|
|||
"http://localhost:8000",
|
||||
]
|
||||
|
||||
REST_FRAMEWORK = {
|
||||
'DEFAULT_AUTHENTICATION_CLASSES': (
|
||||
'rest_framework.authentication.TokenAuthentication',
|
||||
),
|
||||
}
|
||||
|
||||
DJOSER = {
|
||||
'SEND_ACTIVATION_EMAIL': True,
|
||||
'SEND_CONFIRMATION_EMAIL': True,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue