Update to Django 3.1.12. (#3378)

* Update to Django 3.1.12.

* Update changelog and add comment.
main
MashaSS 5 years ago committed by GitHub
parent 3e93f95ef7
commit 0c524c6d14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Updated manifest format, added meta with related images (<https://github.com/openvinotoolkit/cvat/pull/3122>)
- Update of COCO format documentation (<https://github.com/openvinotoolkit/cvat/pull/3197>)
- Updated Webpack Dev Server config to add proxxy (<https://github.com/openvinotoolkit/cvat/pull/3368>)
- Update to Django 3.1.12 (<https://github.com/openvinotoolkit/cvat/pull/3378>)
### Deprecated

@ -275,7 +275,8 @@ class MyFileSystemStorage(FileSystemStorage):
return name
def upload_path_handler(instance, filename):
return os.path.join(instance.data.get_upload_dirname(), filename)
# relative path is required since Django 3.1.11
return os.path.join(os.path.relpath(instance.data.get_upload_dirname(), settings.BASE_DIR), filename)
# For client files which the user is uploaded
class ClientFile(models.Model):
@ -612,4 +613,4 @@ class CloudStorage(models.Model):
return {
item.split('=')[0].strip(): item.split('=')[1].strip()
for item in specific_attributes.split('&')
} if specific_attributes else dict()
} if specific_attributes else dict()

@ -1,5 +1,5 @@
click==7.1.2
Django==3.1.10
Django==3.1.12
django-appconf==1.0.4
django-auth-ldap==2.2.0
django-cacheops==5.0.1

@ -5,12 +5,13 @@
from .development import *
import tempfile
_temp_dir = tempfile.TemporaryDirectory(suffix="cvat")
_temp_dir = tempfile.TemporaryDirectory(dir=BASE_DIR, suffix="cvat")
BASE_DIR = _temp_dir.name
DATA_ROOT = os.path.join(_temp_dir.name, 'data')
DATA_ROOT = os.path.join(BASE_DIR, 'data')
os.makedirs(DATA_ROOT, exist_ok=True)
SHARE_ROOT = os.path.join(_temp_dir.name, 'share')
SHARE_ROOT = os.path.join(BASE_DIR, 'share')
os.makedirs(SHARE_ROOT, exist_ok=True)
MEDIA_DATA_ROOT = os.path.join(DATA_ROOT, 'data')
@ -30,7 +31,7 @@ os.makedirs(CACHE_ROOT, exist_ok=True)
# To avoid ERROR django.security.SuspiciousFileOperation:
# The joined path (...) is located outside of the base path component
MEDIA_ROOT = _temp_dir.name
MEDIA_ROOT = BASE_DIR
# Suppress all logs by default
for logger in LOGGING["loggers"].values():

Loading…
Cancel
Save