mirror of
https://github.com/lemeow125/StudE-Backend.git
synced 2024-11-17 06:19:24 +08:00
Switch to JSON web token and set default host to 0.0.0.0
This commit is contained in:
parent
e567b5d399
commit
a7d5cdd56e
3 changed files with 5 additions and 2 deletions
|
@ -3,5 +3,5 @@ from django.urls import path, include
|
|||
|
||||
urlpatterns = [
|
||||
path('', include('djoser.urls')),
|
||||
path('', include('djoser.urls.authtoken')),
|
||||
path('', include('djoser.urls.jwt')),
|
||||
]
|
||||
|
|
|
@ -109,7 +109,7 @@ TEMPLATES = [
|
|||
|
||||
REST_FRAMEWORK = {
|
||||
'DEFAULT_AUTHENTICATION_CLASSES': (
|
||||
'rest_framework.authentication.TokenAuthentication',
|
||||
'rest_framework_simplejwt.authentication.JWTAuthentication',
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
"""Django's command-line utility for administrative tasks."""
|
||||
import os
|
||||
import sys
|
||||
from django.core.management.commands.runserver import Command as runserver
|
||||
|
||||
|
||||
def main():
|
||||
|
@ -19,4 +20,6 @@ def main():
|
|||
|
||||
|
||||
if __name__ == '__main__':
|
||||
# Override default port for `runserver` command
|
||||
runserver.default_addr = '0.0.0.0'
|
||||
main()
|
||||
|
|
Loading…
Reference in a new issue