From 5d9fb5f34302d0ecb41d52613409152e2e33e291 Mon Sep 17 00:00:00 2001 From: Michael Herrmann Date: Fri, 10 Dec 2021 14:47:31 +0100 Subject: [PATCH] Downgrade to Django 3.2 Django 4 is only a few days old so library support for it isn't up-to-par yet. --- api/migrations/0001_initial.py | 2 +- requirements/base-full.txt | 4 ++-- requirements/base.txt | 2 +- wpr/asgi.py | 2 +- wpr/settings.py | 22 ++++++++++++---------- wpr/wsgi.py | 2 +- 6 files changed, 18 insertions(+), 16 deletions(-) diff --git a/api/migrations/0001_initial.py b/api/migrations/0001_initial.py index 6b19ae4..66a5399 100644 --- a/api/migrations/0001_initial.py +++ b/api/migrations/0001_initial.py @@ -1,4 +1,4 @@ -# Generated by Django 4.0 on 2021-12-10 11:30 +# Generated by Django 3.2.10 on 2021-12-10 13:43 import django.core.validators from django.db import migrations, models diff --git a/requirements/base-full.txt b/requirements/base-full.txt index 45afb4b..e31f069 100644 --- a/requirements/base-full.txt +++ b/requirements/base-full.txt @@ -1,6 +1,6 @@ # Output of `pip freeze` after `pip install -Ur base.txt`. asgiref==3.4.1 -Django==4.0 +Django==3.2.10 +pytz==2021.3 sqlparse==0.4.2 -tzdata==2021.5 diff --git a/requirements/base.txt b/requirements/base.txt index 16a6628..735aab1 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -1,3 +1,3 @@ # Update base-full.txt after any changes! -django==4.0 \ No newline at end of file +django==3.2.10 \ No newline at end of file diff --git a/wpr/asgi.py b/wpr/asgi.py index 540901c..46c0475 100644 --- a/wpr/asgi.py +++ b/wpr/asgi.py @@ -4,7 +4,7 @@ ASGI config for wpr 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/4.0/howto/deployment/asgi/ +https://docs.djangoproject.com/en/3.2/howto/deployment/asgi/ """ import os diff --git a/wpr/settings.py b/wpr/settings.py index 042b8ba..b0a8f2c 100644 --- a/wpr/settings.py +++ b/wpr/settings.py @@ -1,13 +1,13 @@ """ Django settings for wpr project. -Generated by 'django-admin startproject' using Django 4.0. +Generated by 'django-admin startproject' using Django 3.2.10. For more information on this file, see -https://docs.djangoproject.com/en/4.0/topics/settings/ +https://docs.djangoproject.com/en/3.2/topics/settings/ For the full list of settings and their values, see -https://docs.djangoproject.com/en/4.0/ref/settings/ +https://docs.djangoproject.com/en/3.2/ref/settings/ """ from pathlib import Path @@ -17,7 +17,7 @@ BASE_DIR = Path(__file__).resolve().parent.parent # Quick-start development settings - unsuitable for production -# See https://docs.djangoproject.com/en/4.0/howto/deployment/checklist/ +# See https://docs.djangoproject.com/en/3.2/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = 'django-insecure-n$m*a%3#nqpl5=(sp7v+!6r98mld#o4*(24!dawoma2i5(%lh=' @@ -72,7 +72,7 @@ WSGI_APPLICATION = 'wpr.wsgi.application' # Database -# https://docs.djangoproject.com/en/4.0/ref/settings/#databases +# https://docs.djangoproject.com/en/3.2/ref/settings/#databases DATABASES = { 'default': { @@ -83,7 +83,7 @@ DATABASES = { # Password validation -# https://docs.djangoproject.com/en/4.0/ref/settings/#auth-password-validators +# https://docs.djangoproject.com/en/3.2/ref/settings/#auth-password-validators AUTH_PASSWORD_VALIDATORS = [ { @@ -102,7 +102,7 @@ AUTH_PASSWORD_VALIDATORS = [ # Internationalization -# https://docs.djangoproject.com/en/4.0/topics/i18n/ +# https://docs.djangoproject.com/en/3.2/topics/i18n/ LANGUAGE_CODE = 'en-us' @@ -110,15 +110,17 @@ TIME_ZONE = 'UTC' USE_I18N = True +USE_L10N = True + USE_TZ = True # Static files (CSS, JavaScript, Images) -# https://docs.djangoproject.com/en/4.0/howto/static-files/ +# https://docs.djangoproject.com/en/3.2/howto/static-files/ -STATIC_URL = 'static/' +STATIC_URL = '/static/' # Default primary key field type -# https://docs.djangoproject.com/en/4.0/ref/settings/#default-auto-field +# https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' diff --git a/wpr/wsgi.py b/wpr/wsgi.py index 9e75de4..0f4f1e5 100644 --- a/wpr/wsgi.py +++ b/wpr/wsgi.py @@ -4,7 +4,7 @@ WSGI config for wpr 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/4.0/howto/deployment/wsgi/ +https://docs.djangoproject.com/en/3.2/howto/deployment/wsgi/ """ import os