diff --git a/docker/settings.py b/docker/settings.py index 0cc54fe..311570d 100644 --- a/docker/settings.py +++ b/docker/settings.py @@ -3,11 +3,6 @@ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) import os -if os.getenv("ENV", "localdev") == "localdev": - DEBUG = True -else: - DEBUG = False - ALLOWED_HOSTS += [ "test.mobile.washington.edu", # for testing purposes "mobile.uw.edu", # Extraneous after DNS switch @@ -16,6 +11,13 @@ "m.washington.edu", # Extraneous after DNS switch unless 301 ] +if os.getenv("ENV", "localdev") == "localdev": + DEBUG = True +else: + DEBUG = False + CSRF_TRUSTED_ORIGINS = [ + f"https://{host}" for host in ALLOWED_HOSTS if host.endswith(".edu")] + GOOGLE_ANALYTICS_KEY = os.getenv('GOOGLE_ANALYTICS_KEY', None) INSTALLED_APPS += [ diff --git a/docker/urls.py b/docker/urls.py index 0abd710..cdaa8d6 100644 --- a/docker/urls.py +++ b/docker/urls.py @@ -13,10 +13,11 @@ 1. Add an import: from blog import urls as blog_urls 2. Add a URL to urlpatterns: url(r'^blog/', include(blog_urls)) """ -from django.urls import include, path +from django.urls import path from django.contrib import admin from django.contrib.auth.decorators import login_required from django.conf import settings +from django.conf.urls import include from django.conf.urls.static import static from mdot.admin import admin_site diff --git a/mdot/urls.py b/mdot/urls.py index 4d20030..6db0b42 100644 --- a/mdot/urls.py +++ b/mdot/urls.py @@ -1,7 +1,8 @@ # Copyright 2023 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 -from django.urls import include, path +from django.urls import path +from django.conf.urls import include from . import views from django.contrib import admin from django.contrib.auth.decorators import login_required diff --git a/setup.py b/setup.py index 4cb038b..fa98c2c 100644 --- a/setup.py +++ b/setup.py @@ -13,9 +13,9 @@ include_package_data=True, install_requires=[ 'setuptools', - 'django~=3.2', + 'django~=4.2', 'django-compressor', - 'UW-RestClients-Core~=1.3', + 'UW-RestClients-Core~=1.4', 'django-htmlmin', 'lesscpy', 'django-pyscss', @@ -26,11 +26,11 @@ 'UW-Django-SAML2', ], license='Apache License, Version 2.0', - description='A Django app to ...', + description='Mobile UW web application', long_description=README, - url='http://www.example.com/', - author='Your Name', - author_email='yourname@example.com', + url='https://github.com/uw-it-aca/mdot', + author='UW-IT T&LS', + author_email='aca-it@uw.edu', classifiers=[ 'Environment :: Web Environment', 'Framework :: Django', @@ -38,7 +38,6 @@ 'License :: OSI Approved :: Apache Software License', 'Operating System :: OS Independent', 'Programming Language :: Python', - 'Programming Language :: Python :: 3.6', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', ],