From fa0c3832274cfcc1ece8ab0e85a629cb3f922e92 Mon Sep 17 00:00:00 2001 From: j Date: Wed, 31 Aug 2022 10:28:41 +0200 Subject: [PATCH] only django<4 for now, support python3.10 --- manage.py | 8 +++++--- requirements.txt | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/manage.py b/manage.py index 118d972..5e3f1fe 100755 --- a/manage.py +++ b/manage.py @@ -5,11 +5,13 @@ import sys def activate_venv(base): if os.path.exists(base): - old_os_path = os.environ.get('PATH', '') - os.environ['PATH'] = os.path.join(base, 'bin') + os.pathsep + old_os_path - site_packages = os.path.join(base, 'lib', 'python%s' % sys.version[:3], 'site-packages') + old_os_path = os.environ.get("PATH", "") + os.environ["PATH"] = os.path.join(base, "bin") + os.pathsep + old_os_path + version = "%s.%s" % (sys.version_info.major, sys.version_info.minor) + site_packages = os.path.join(base, "lib", "python%s" % version, "site-packages") prev_sys_path = list(sys.path) import site + site.addsitedir(site_packages) sys.real_prefix = sys.prefix sys.prefix = base diff --git a/requirements.txt b/requirements.txt index 5ffb1df..b434e5e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -Django +Django<4 libsass django-compressor django-sass-processor