From 1ee7ca25e1a1ce80e8a279c20b9dfb8d58d277ae Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Sat, 20 Mar 2021 16:07:43 -0600 Subject: [PATCH] Install rest-auth --- server/server/settings.py | 8 ++++++++ server/server/urls.py | 4 +++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/server/server/settings.py b/server/server/settings.py index 60964c5..db7c928 100644 --- a/server/server/settings.py +++ b/server/server/settings.py @@ -37,7 +37,13 @@ INSTALLED_APPS = [ 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', + 'django.contrib.sites', 'rest_framework', + 'rest_framework.authtoken', + 'rest_auth', + 'allauth', + 'allauth.account', + 'rest_auth.registration', ] MIDDLEWARE = [ @@ -119,3 +125,5 @@ USE_TZ = True # https://docs.djangoproject.com/en/3.1/howto/static-files/ STATIC_URL = '/static/' + +SITE_ID = 1 diff --git a/server/server/urls.py b/server/server/urls.py index 5dbb73d..11cdcd0 100644 --- a/server/server/urls.py +++ b/server/server/urls.py @@ -7,5 +7,7 @@ router.register(r'users', views.UserViewSet) urlpatterns = [ path('', include(router.urls)), - path('api-auth/', include('rest_framework.urls', namespace='rest_framework')) + path('api-auth/', include('rest_framework.urls', namespace='rest_framework')), + url(r'^rest-auth/', include('rest_auth.urls')), + url(r'^rest-auth/registration/', include('rest_auth.registration.urls')), ]