Skip to content

Commit 40bf7ca

Browse files
committed
manage: Check Django version on startup
This was recently reported as an issue. Add a simple check to ensure people update their dependencies as expected. Signed-off-by: Stephen Finucane <[email protected]> Cc: Siddhesh Poyarekar <[email protected]> Cc: DJ Delorie <[email protected]> Cc: Carlos O'Donell <[email protected]> (cherry picked from commit b5769e6)
1 parent 106242a commit 40bf7ca

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

manage.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
"DJANGO_SETTINGS_MODULE", "patchwork.settings.production"
88
)
99

10+
import django
11+
12+
if django.VERSION < (3, 2):
13+
raise Exception('Patchwork requires Django 3.2 or greater')
14+
1015
from django.core.management import execute_from_command_line
1116

1217
execute_from_command_line(sys.argv)
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
features:
3+
- |
4+
The version of Django used is now checked on start-up. This can help avoid
5+
issues where deployers forget to update their Django version and see odd
6+
behavior as a result.

0 commit comments

Comments
 (0)