From cef608b809e3c05f7c1246066d1a207a46d4d272 Mon Sep 17 00:00:00 2001 From: Beichi-CHs Date: Thu, 18 Nov 2021 18:08:17 +0800 Subject: [PATCH] resolve backward compatibility issues Signed-off-by: Beichi-CHs --- .travis.yml | 5 +---- docs/data.json | 9 +++++++++ oj/settings.py | 2 ++ utils/models.py | 2 +- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index a4465e41..5af64802 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,6 @@ services: - docker - postgresql install: - - pip install psycopg2 - pip install -r deploy/requirements.txt - echo `cat /dev/urandom | head -1 | md5sum | head -c 32` > data/config/secret.key - ./init_db.sh @@ -15,6 +14,4 @@ script: - coverage run --include="$PWD/*" manage.py test - coverage report notifications: - email: - - beichi.dev@gmail.com - - 841734459@qq.com + slack: onlinejudgeteam:BzBz8UFgmS5crpiblof17K2W diff --git a/docs/data.json b/docs/data.json index 37edcd52..bd9c6f00 100644 --- a/docs/data.json +++ b/docs/data.json @@ -1,5 +1,14 @@ { "update": [ + { + "version": "2021-11-20", + "level": "Important", + "title": "2021-11-20", + "details": [ + "django2.x即将停止支持,更新django到3.x LTS,相应地更新了全部相关依赖", + "合并底包版本到python3.8-alpine3.14,为移除python2做准备" + ] + }, { "version": "2021-09-28", "level": "Recommend", diff --git a/oj/settings.py b/oj/settings.py index c1141a02..74c559bc 100644 --- a/oj/settings.py +++ b/oj/settings.py @@ -244,3 +244,5 @@ RAVEN_CONFIG = { } IP_HEADER = "HTTP_X_REAL_IP" + +DEFAULT_AUTO_FIELD='django.db.models.AutoField' \ No newline at end of file diff --git a/utils/models.py b/utils/models.py index 9a1cd0ba..7577f1fa 100644 --- a/utils/models.py +++ b/utils/models.py @@ -1,4 +1,4 @@ -from django.contrib.postgres.fields import JSONField # NOQA +from django.db.models import JSONField # NOQA from django.db import models from utils.xss_filter import XSSHtml