From c44821750f1b8150b360e901c5f60dd83387db4f Mon Sep 17 00:00:00 2001 From: Dirk Alders Date: Tue, 4 Feb 2020 10:37:48 +0100 Subject: [PATCH] django3 compatibility and links in comments --- main/asgi.py | 16 ++++++++++++++++ main/settings.py | 16 ++++++++-------- main/urls.py | 2 +- main/wsgi.py | 2 +- requirements.txt | 2 +- themes | 2 +- 6 files changed, 28 insertions(+), 12 deletions(-) create mode 100644 main/asgi.py diff --git a/main/asgi.py b/main/asgi.py new file mode 100644 index 0000000..fabf75e --- /dev/null +++ b/main/asgi.py @@ -0,0 +1,16 @@ +""" +ASGI config for main project. + +It exposes the ASGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/3.0/howto/deployment/asgi/ +""" + +import os + +from django.core.asgi import get_asgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'main.settings') + +application = get_asgi_application() diff --git a/main/settings.py b/main/settings.py index acbfd29..985b14a 100644 --- a/main/settings.py +++ b/main/settings.py @@ -1,13 +1,13 @@ """ Django settings for this project. -Generated by 'django-admin startproject' using Django 2.2.3. +Generated by 'django-admin startproject' using Django 3.0.3. For more information on this file, see -https://docs.djangoproject.com/en/2.2/topics/settings/ +https://docs.djangoproject.com/en/3.0/topics/settings/ For the full list of settings and their values, see -https://docs.djangoproject.com/en/2.2/ref/settings/ +https://docs.djangoproject.com/en/3.0/ref/settings/ """ import config @@ -47,7 +47,7 @@ for property_name in USER_CONFIG_DEFAULTS: setattr(thismodule, property_name, value) # Quick-start development settings - unsuitable for production -# See https://docs.djangoproject.com/en/2.2/howto/deployment/checklist/ +# See https://docs.djangoproject.com/en/3.0/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! # @@ -114,7 +114,7 @@ WSGI_APPLICATION = 'main.wsgi.application' # Database -# https://docs.djangoproject.com/en/2.2/ref/settings/#databases +# https://docs.djangoproject.com/en/3.0/ref/settings/#databases # DATABASES = { 'default': { @@ -125,7 +125,7 @@ DATABASES = { # Password validation -# https://docs.djangoproject.com/en/2.2/ref/settings/#auth-password-validators +# https://docs.djangoproject.com/en/3.0/ref/settings/#auth-password-validators # AUTH_PASSWORD_VALIDATORS = [ { @@ -149,7 +149,7 @@ WHOOSH_PATH = os.path.join(BASE_DIR, 'data', 'whoosh_index') # Internationalization -# https://docs.djangoproject.com/en/2.2/topics/i18n/ +# https://docs.djangoproject.com/en/3.0/topics/i18n/ # LANGUAGE_CODE = 'en-us' LANGUAGES = [ @@ -172,7 +172,7 @@ USE_TZ = True # Static files (CSS, JavaScript, Images) -# https://docs.djangoproject.com/en/2.2/howto/static-files/ +# https://docs.djangoproject.com/en/3.0/howto/static-files/ # STATIC_ROOT = os.path.join(BASE_DIR, 'data', 'static') STATIC_URL = '/static/' diff --git a/main/urls.py b/main/urls.py index 2fdeb3d..16dc1f5 100644 --- a/main/urls.py +++ b/main/urls.py @@ -1,7 +1,7 @@ """Project URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: - https://docs.djangoproject.com/en/2.2/topics/http/urls/ + https://docs.djangoproject.com/en/3.0/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views diff --git a/main/wsgi.py b/main/wsgi.py index fa40526..9a58840 100644 --- a/main/wsgi.py +++ b/main/wsgi.py @@ -4,7 +4,7 @@ WSGI config for this project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see -https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/ +https://docs.djangoproject.com/en/3.0/howto/deployment/wsgi/ """ import os diff --git a/requirements.txt b/requirements.txt index 2637745..97489da 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -Django>=2.0.5,<3.0 +Django>=2.0.5 Pillow>=5.4.1 python-creole>=1.0.0 Whoosh>=2.4.0 diff --git a/themes b/themes index a24e772..b0106a3 160000 --- a/themes +++ b/themes @@ -1 +1 @@ -Subproject commit a24e772083b27e9ab413d137005dbc9e8325dbc4 +Subproject commit b0106a3d5cc302844dacc681f75f047876525e5e