From 5526cf708bd4277b61fa2f22bf4e8467c00514e6 Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Tue, 7 Jan 2020 08:23:06 +0000 Subject: [PATCH] Add django-allauth for registrations --- apiserver/apiserver/settings.py | 6 ++++++ apiserver/apiserver/urls.py | 1 + 2 files changed, 7 insertions(+) diff --git a/apiserver/apiserver/settings.py b/apiserver/apiserver/settings.py index 65a55d7..2dd800b 100644 --- a/apiserver/apiserver/settings.py +++ b/apiserver/apiserver/settings.py @@ -46,10 +46,14 @@ INSTALLED_APPS = [ 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', + 'django.contrib.sites', 'rest_framework', 'rest_framework.authtoken', 'apiserver.api', 'rest_auth', + 'allauth', + 'allauth.account', + 'rest_auth.registration', ] MIDDLEWARE = [ @@ -203,3 +207,5 @@ LOGGING = { }, } } + +SITE_ID = 1 diff --git a/apiserver/apiserver/urls.py b/apiserver/apiserver/urls.py index 440e57f..617523c 100644 --- a/apiserver/apiserver/urls.py +++ b/apiserver/apiserver/urls.py @@ -13,4 +13,5 @@ urlpatterns = [ path('admin/', admin.site.urls), path('api-auth/', include('rest_framework.urls')), url(r'^rest-auth/', include('rest_auth.urls')), + url(r'^rest-auth/registration/', include('rest_auth.registration.urls')) ]