From 09b002e46b69b43ccd9fc1be29c8bf15f7c2e8be Mon Sep 17 00:00:00 2001 From: Bobby Date: Wed, 20 Jul 2022 10:50:10 +0530 Subject: Add localhost to trusted apps, include urls for users --- thatcomputerscientist/settings.py | 5 +++-- thatcomputerscientist/urls.py | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/thatcomputerscientist/settings.py b/thatcomputerscientist/settings.py index 715a52b2..183cdde9 100644 --- a/thatcomputerscientist/settings.py +++ b/thatcomputerscientist/settings.py @@ -31,8 +31,8 @@ DEBUG = os.getenv('ENVIRONMENT') == 'development' or False ALLOWED_HOSTS = ["*"] CSRF_TRUSTED_ORIGINS = ['https://*.thatcomputerscientist.com', 'https://*.thatcomputerscientist.fly.dev/'] -SESSION_COOKIE_DOMAIN = ".thatcomputerscientist.com" -DOMAIN_NAME = "thatcomputerscientist.com" +SESSION_COOKIE_DOMAIN = "127.0.0.1" if os.getenv('ENVIRONMENT') == 'development' else ".thatcomputerscientist.com" +DOMAIN_NAME = "127.0.0.1:8000" if os.getenv('ENVIRONMENT') == 'development' else "thatcomputerscientist.com" # Application definition @@ -44,6 +44,7 @@ INSTALLED_APPS = [ 'django.contrib.messages', 'django.contrib.staticfiles', 'blog', + 'users', ] MIDDLEWARE = [ diff --git a/thatcomputerscientist/urls.py b/thatcomputerscientist/urls.py index 2fb02d7d..ca983e21 100644 --- a/thatcomputerscientist/urls.py +++ b/thatcomputerscientist/urls.py @@ -19,4 +19,5 @@ from django.urls import path, include urlpatterns = [ path('admin/', admin.site.urls), path('', include('blog.urls')), + path('users/', include('users.urls', namespace='users')), ] -- cgit v1.2.3