diff --git a/stude/accounts/urls.py b/stude/accounts/urls.py index 8df3791..22c121e 100644 --- a/stude/accounts/urls.py +++ b/stude/accounts/urls.py @@ -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')), ] diff --git a/stude/config/settings.py b/stude/config/settings.py index 3a18cd8..a0e5621 100644 --- a/stude/config/settings.py +++ b/stude/config/settings.py @@ -109,7 +109,7 @@ TEMPLATES = [ REST_FRAMEWORK = { 'DEFAULT_AUTHENTICATION_CLASSES': ( - 'rest_framework.authentication.TokenAuthentication', + 'rest_framework_simplejwt.authentication.JWTAuthentication', ) } diff --git a/stude/manage.py b/stude/manage.py index 8e7ac79..e0c0fbe 100644 --- a/stude/manage.py +++ b/stude/manage.py @@ -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()