From 3ceff001bb84ae23fd993ff32352e9162c3f8049 Mon Sep 17 00:00:00 2001 From: Sajeyks Date: Fri, 6 Nov 2026 15:07:37 +0300 Subject: [PATCH] Upgrade to Django 3.2 LTS Step 1 of the upgrade (Python 3.9). Dependencies are bumped to their newest versions compatible with Django 3.2. DEFAULT_AUTO_FIELD is set to AutoField, which matches the existing tables, so no migration is needed and the W042 warnings go away. --- dal/settings.py | 3 +++ requirements.txt | 16 ++++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/dal/settings.py b/dal/settings.py index 74dc14f..3521520 100644 --- a/dal/settings.py +++ b/dal/settings.py @@ -150,6 +150,9 @@ DATABASES = { } SECRET_KEY = config('SECRET_KEY') +# Keep 32-bit ids: existing tables were created with AutoField. +DEFAULT_AUTO_FIELD = 'django.db.models.AutoField' + AUTH_LDAP_USER_ATTR_MAP = { "first_name": "givenName", "last_name": "sn", diff --git a/requirements.txt b/requirements.txt index 073a703..df69615 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,10 +1,10 @@ -# Baseline: what production runs (Django 2.2), pinned so the upgrade is reproducible. -django==2.2.28 -django-auth-ldap==2.2.0 -python-ldap==3.4.4 -django-bootstrap3==14.2.0 +# Upgrade step 1: Django 3.2 LTS on Python 3.9. +django==3.2.25 +django-auth-ldap==4.8.0 +python-ldap==3.4.8 +django-bootstrap3==23.6 python-decouple==3.8 ldap3==2.9.1 -djangorestframework==3.12.4 -pyotp==2.9.0 -requests==2.32.3 +djangorestframework==3.15.1 +pyotp==2.10.0 +requests==2.32.5