Skip to content

Commit 9563e74

Browse files
committed
enforce minimum django version
1 parent 5a66e8a commit 9563e74

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

archivebox/config.py

+5
Original file line numberDiff line numberDiff line change
@@ -988,6 +988,11 @@ def check_system_config(config: ConfigDict=CONFIG) -> None:
988988
stderr(' See https://github.com/ArchiveBox/ArchiveBox/wiki/Troubleshooting#python for help upgrading your Python installation.')
989989
raise SystemExit(2)
990990

991+
if int(CONFIG['DJANGO_VERSION'].split('.')[0]) < 3:
992+
stderr(f'[X] Django version is not new enough: {config["DJANGO_VERSION"]} (>3.0 is required)', color='red')
993+
stderr(' Upgrade django using pip or your system package manager: pip3 install --upgrade django')
994+
raise SystemExit(2)
995+
991996
if config['PYTHON_ENCODING'] not in ('UTF-8', 'UTF8'):
992997
stderr(f'[X] Your system is running python3 scripts with a bad locale setting: {config["PYTHON_ENCODING"]} (it should be UTF-8).', color='red')
993998
stderr(' To fix it, add the line "export PYTHONIOENCODING=UTF-8" to your ~/.bashrc file (without quotes)')

0 commit comments

Comments
 (0)