Skip to content

Upgrade Python Django 4.0 to 5.2 LTS - #2

Merged
kkamara merged 4 commits into
mainfrom
upgrade-python-django-4.0-to-5.2-lts
Aug 19, 2026
Merged

Upgrade Python Django 4.0 to 5.2 LTS#2
kkamara merged 4 commits into
mainfrom
upgrade-python-django-4.0-to-5.2-lts

Conversation

@kkamara

Copy link
Copy Markdown
Owner

No description provided.

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the project stack for a Django 5.2 LTS / Python 3.13 baseline and streamlines the repository by removing large sets of vendored static/admin/frontend assets, while updating container/runtime tooling.

Changes:

  • Upgrade dependencies and runtime targets (Django 5.2, Python 3.13; new production requirements file).
  • Simplify routing and remove bundled frontend/DRF-related assets and vendor static files.
  • Add operational tooling: request logging + admin rate-limit middleware, DB preflight on runserver, and container/workflow adjustments.

Reviewed changes

Copilot reviewed 116 out of 257 changed files in this pull request and generated 6 comments.

Show a summary per file
FileDescription
static/rest_framework/js/default.jsRemove vendored DRF JS asset
static/rest_framework/js/csrf.jsRemove vendored DRF CSRF helper
static/rest_framework/js/ajax-form.jsRemove vendored DRF AJAX form helper
static/rest_framework/docs/js/jquery.json-view.min.jsRemove vendored docs JS plugin
static/rest_framework/docs/css/jquery.json-view.min.cssRemove vendored docs CSS
static/rest_framework/docs/css/highlight.cssRemove vendored docs highlight theme
static/rest_framework/docs/css/base.cssRemove vendored docs base styles
static/rest_framework/css/prettify.cssRemove vendored prettify styles
static/rest_framework/css/default.cssRemove vendored DRF default styles
static/rest_framework/css/bootstrap-tweaks.cssRemove vendored bootstrap tweak styles
static/js/main.cf10efc5.js.LICENSE.txtRemove built asset license bundle
static/js/787.59b41c7e.chunk.jsRemove built JS chunk
static/django_extensions/js/jquery.bgiframe.jsRemove vendored django-extensions JS plugin
static/django_extensions/js/jquery.ajaxQueue.jsRemove vendored django-extensions JS plugin
static/django_extensions/css/jquery.autocomplete.cssRemove vendored django-extensions CSS
static/admin/js/vendor/xregexp/LICENSE.txtRemove vendored license file
static/admin/js/vendor/select2/LICENSE.mdRemove vendored license file
static/admin/js/vendor/select2/i18n/zh-TW.jsRemove vendored Select2 locale
static/admin/js/vendor/select2/i18n/zh-CN.jsRemove vendored Select2 locale
static/admin/js/vendor/select2/i18n/vi.jsRemove vendored Select2 locale
static/admin/js/vendor/select2/i18n/uk.jsRemove vendored Select2 locale
static/admin/js/vendor/select2/i18n/tr.jsRemove vendored Select2 locale
static/admin/js/vendor/select2/i18n/tk.jsRemove vendored Select2 locale
static/admin/js/vendor/select2/i18n/th.jsRemove vendored Select2 locale
static/admin/js/vendor/select2/i18n/sv.jsRemove vendored Select2 locale
static/admin/js/vendor/select2/i18n/sr.jsRemove vendored Select2 locale
static/admin/js/vendor/select2/i18n/sr-Cyrl.jsRemove vendored Select2 locale
static/admin/js/vendor/select2/i18n/sq.jsRemove vendored Select2 locale
static/admin/js/vendor/select2/i18n/sl.jsRemove vendored Select2 locale
static/admin/js/vendor/select2/i18n/sk.jsRemove vendored Select2 locale
static/admin/js/vendor/select2/i18n/ru.jsRemove vendored Select2 locale
static/admin/js/vendor/select2/i18n/ro.jsRemove vendored Select2 locale
static/admin/js/vendor/select2/i18n/pt.jsRemove vendored Select2 locale
static/admin/js/vendor/select2/i18n/pt-BR.jsRemove vendored Select2 locale
static/admin/js/vendor/select2/i18n/ps.jsRemove vendored Select2 locale
static/admin/js/vendor/select2/i18n/pl.jsRemove vendored Select2 locale
static/admin/js/vendor/select2/i18n/nl.jsRemove vendored Select2 locale
static/admin/js/vendor/select2/i18n/ne.jsRemove vendored Select2 locale
static/admin/js/vendor/select2/i18n/nb.jsRemove vendored Select2 locale
static/admin/js/vendor/select2/i18n/ms.jsRemove vendored Select2 locale
static/admin/js/vendor/select2/i18n/mk.jsRemove vendored Select2 locale
static/admin/js/vendor/select2/i18n/lv.jsRemove vendored Select2 locale
static/admin/js/vendor/select2/i18n/lt.jsRemove vendored Select2 locale
static/admin/js/vendor/select2/i18n/ko.jsRemove vendored Select2 locale
static/admin/js/vendor/select2/i18n/km.jsRemove vendored Select2 locale
static/admin/js/vendor/select2/i18n/ka.jsRemove vendored Select2 locale
static/admin/js/vendor/select2/i18n/ja.jsRemove vendored Select2 locale
static/admin/js/vendor/select2/i18n/it.jsRemove vendored Select2 locale
static/admin/js/vendor/select2/i18n/is.jsRemove vendored Select2 locale
static/admin/js/vendor/select2/i18n/id.jsRemove vendored Select2 locale
static/admin/js/vendor/select2/i18n/hy.jsRemove vendored Select2 locale
static/admin/js/vendor/select2/i18n/hu.jsRemove vendored Select2 locale
static/admin/js/vendor/select2/i18n/hsb.jsRemove vendored Select2 locale
static/admin/js/vendor/select2/i18n/hr.jsRemove vendored Select2 locale
static/admin/js/vendor/select2/i18n/hi.jsRemove vendored Select2 locale
static/admin/js/vendor/select2/i18n/he.jsRemove vendored Select2 locale
static/admin/js/vendor/select2/i18n/gl.jsRemove vendored Select2 locale
static/admin/js/vendor/select2/i18n/fr.jsRemove vendored Select2 locale
static/admin/js/vendor/select2/i18n/fi.jsRemove vendored Select2 locale
static/admin/js/vendor/select2/i18n/fa.jsRemove vendored Select2 locale
static/admin/js/vendor/select2/i18n/eu.jsRemove vendored Select2 locale
static/admin/js/vendor/select2/i18n/et.jsRemove vendored Select2 locale
static/admin/js/vendor/select2/i18n/es.jsRemove vendored Select2 locale
static/admin/js/vendor/select2/i18n/en.jsRemove vendored Select2 locale
static/admin/js/vendor/select2/i18n/el.jsRemove vendored Select2 locale
static/admin/js/vendor/select2/i18n/dsb.jsRemove vendored Select2 locale
static/admin/js/vendor/select2/i18n/de.jsRemove vendored Select2 locale
static/admin/js/vendor/select2/i18n/da.jsRemove vendored Select2 locale
static/admin/js/vendor/select2/i18n/cs.jsRemove vendored Select2 locale
static/admin/js/vendor/select2/i18n/ca.jsRemove vendored Select2 locale
static/admin/js/vendor/select2/i18n/bs.jsRemove vendored Select2 locale
static/admin/js/vendor/select2/i18n/bn.jsRemove vendored Select2 locale
static/admin/js/vendor/select2/i18n/bg.jsRemove vendored Select2 locale
static/admin/js/vendor/select2/i18n/az.jsRemove vendored Select2 locale
static/admin/js/vendor/select2/i18n/ar.jsRemove vendored Select2 locale
static/admin/js/vendor/select2/i18n/af.jsRemove vendored Select2 locale
static/admin/js/vendor/jquery/LICENSE.txtRemove vendored jQuery license
static/admin/js/SelectBox.jsRemove vendored Django admin JS
static/admin/js/prepopulate.jsRemove vendored Django admin JS
static/admin/js/prepopulate_init.jsRemove vendored Django admin JS
static/admin/js/popup_response.jsRemove vendored Django admin JS
static/admin/js/nav_sidebar.jsRemove vendored Django admin JS
static/admin/js/jquery.init.jsRemove vendored Django admin JS
static/admin/js/core.jsRemove vendored Django admin JS
static/admin/js/collapse.jsRemove vendored Django admin JS
static/admin/js/change_form.jsRemove vendored Django admin JS
static/admin/js/cancel.jsRemove vendored Django admin JS
static/admin/js/calendar.jsRemove vendored Django admin JS
static/admin/js/autocomplete.jsRemove vendored Django admin JS
static/admin/js/admin/RelatedObjectLookups.jsRemove vendored Django admin JS
static/admin/js/actions.jsRemove vendored Django admin JS
static/admin/img/tooltag-arrowright.svgRemove vendored Django admin image
static/admin/img/tooltag-add.svgRemove vendored Django admin image
static/admin/img/sorting-icons.svgRemove vendored Django admin image
static/admin/img/selector-icons.svgRemove vendored Django admin image
static/admin/img/search.svgRemove vendored Django admin image
static/admin/img/README.txtRemove vendored Django admin readme
static/admin/img/LICENSERemove vendored Django admin license
static/admin/img/inline-delete.svgRemove vendored Django admin image
static/admin/img/icon-yes.svgRemove vendored Django admin image
static/admin/img/icon-viewlink.svgRemove vendored Django admin image
static/admin/img/icon-unknown.svgRemove vendored Django admin image
static/admin/img/icon-unknown-alt.svgRemove vendored Django admin image
static/admin/img/icon-no.svgRemove vendored Django admin image
static/admin/img/icon-deletelink.svgRemove vendored Django admin image
static/admin/img/icon-clock.svgRemove vendored Django admin image
static/admin/img/icon-changelink.svgRemove vendored Django admin image
static/admin/img/icon-calendar.svgRemove vendored Django admin image
static/admin/img/icon-alert.svgRemove vendored Django admin image
static/admin/img/icon-addlink.svgRemove vendored Django admin image
static/admin/img/gis/move_vertex_on.svgRemove vendored Django admin GIS image
static/admin/img/gis/move_vertex_off.svgRemove vendored Django admin GIS image
static/admin/img/calendar-icons.svgRemove vendored Django admin image
static/admin/fonts/README.txtRemove vendored Django admin font readme
static/admin/fonts/LICENSE.txtRemove vendored Django admin font license
static/admin/css/vendor/select2/LICENSE-SELECT2.mdRemove vendored Select2 CSS license
static/admin/css/rtl.cssRemove vendored Django admin CSS
static/admin/css/responsive_rtl.cssRemove vendored Django admin CSS
static/admin/css/nav_sidebar.cssRemove vendored Django admin CSS
static/admin/css/login.cssRemove vendored Django admin CSS
static/admin/css/fonts.cssRemove vendored Django admin CSS
static/admin/css/dashboard.cssRemove vendored Django admin CSS
setup.cfgRemove flake8 configuration file
seleniumpy/management/commands/crawl.pyImprove crawl command logging/exception handling
screenshots/.gitignoreKeep screenshots dir but ignore generated images
requirements.txtReplace pinned dependency list with smaller Django 5.2-compatible set
requirements-docker-production.txtAdd production-specific requirements for Docker builds
readme.mdUpdate Docker/admin/mail docs and reorganize sections
passenger_wsgi.pyAdd Passenger WSGI entrypoint loader
logs/.keepPreserve logs directory in repo
logs/.gitignoreKeep logs dir but ignore generated log files
local.ymlUpdate local compose service names, ports, and env wiring
frontend/src/utils/config.jsRemove frontend utility (frontend removal)
frontend/src/setupTests.jsRemove CRA test setup
frontend/src/services/productService.jsRemove frontend service module
frontend/src/services/HttpService.jsRemove frontend HTTP service
frontend/src/services/AuthServices.jsRemove frontend auth services
frontend/src/Routes.jsRemove frontend routing module
frontend/src/reportWebVitals.jsRemove web-vitals reporting
frontend/src/redux/types.jsRemove Redux types
frontend/src/redux/store.jsRemove Redux store
frontend/src/redux/reducers/productsReducer.jsRemove Redux reducer
frontend/src/redux/reducers/index.jsRemove Redux root reducer
frontend/src/redux/actions/productActions.jsRemove Redux actions
frontend/src/PrivateRoute.jsRemove private routing component
frontend/src/logo.svgRemove CRA logo asset
frontend/src/index.scssFrontend styling file (frontend removal)
frontend/src/index.jsRemove CRA entrypoint
frontend/src/Guard.jsRemove route guard component
frontend/src/components/pages/HomeComponent.jsRemove frontend page component
frontend/src/components/layouts/Header.jsRemove frontend header component
frontend/src/bootstrap.jsRemove frontend bootstrap entry
frontend/src/App.test.jsRemove frontend tests
frontend/src/App.scssFrontend styling file (frontend removal)
frontend/src/App.jsRemove frontend App component
frontend/README.mdRemove CRA README
frontend/public/robots.txtRemove CRA public asset
frontend/public/manifest.jsonRemove CRA manifest
frontend/public/index.htmlRemove CRA HTML template
frontend/package.jsonRemove frontend npm manifest
frontend/build/static/js/main.cf10efc5.js.LICENSE.txtRemove built frontend artifact
frontend/build/static/js/787.59b41c7e.chunk.jsRemove built frontend artifact
frontend/build/robots.txtRemove built frontend artifact
frontend/build/manifest.jsonRemove built frontend artifact
frontend/build/index.htmlRemove built frontend artifact
frontend/build/asset-manifest.jsonRemove built frontend artifact
frontend/.gitignoreRemove frontend-specific gitignore
compose/production/traefik/traefik.ymlUpdate Traefik config and remove custom middleware wiring
compose/production/traefik/DockerfileUpdate Traefik image version
compose/production/django/startAdd optional RUN_MIGRATIONS gate; update gunicorn target
compose/production/django/DockerfileUpdate Python base and install from new production requirements file
compose/production/aws/DockerfileUpdate AWS CLI base image
compose/local/docs/DockerfileUpdate Python base version and minor comments
compose/local/django/startUpdate local start flow and switch dev server port to 8000
compose/local/django/DockerfileUpdate Python base and simplify build dependencies
cgi.pyRemove Python 3.13 cgi shim (no longer needed with newer Django)
app/wsgi.pyUpdate docs link and normalize settings module string quoting
app/views.pyRemove catchall TemplateView
app/urls.pyRemove API/catchall routing; keep admin + debug media
app/middleware.pyAdd request logging and admin rate limiting middleware
app/management/commands/runserver.pyAdd DB connectivity preflight before starting dev server
app/asgi.pyUpdate docs link for Django 5.2
app/init.pyMinor formatting adjustment; keep PyMySQL MySQLdb shim
.vscode/settings.jsonRemove editor-specific settings
.gitignoreSimplify ignore ruleset
.github/workflows/build.ymlUpdate CI env creation and target Python 3.13
.envs/.local/.mariadbRemove local MariaDB env file
.env.testingRemove testing env file
.env.exampleExpand and reorganize example env configuration
.dockerignoreIgnore tmp directory during Docker build

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment threadapp/middleware.py
Comment threadapp/management/commands/runserver.py Outdated
Comment threadseleniumpy/management/commands/crawl.py
Comment threadapp/urls.py
Comment on lines 6 to +8
urlpatterns = [
path('admin/', admin.site.urls),
path('api/v1/auth/', include('djoser.urls')),
path('api/v1/auth/', include('djoser.urls.authtoken')),
re_path(r'^.*', views.catchall),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
path("admin/", admin.site.urls),
]
Comment threadreadme.md Outdated
Comment thread.env.example
kkamaraand others added 2 commits August 19, 2026 15:13
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@kkamara
kkamara merged commit 4cd4193 into mainAug 19, 2026
2 checks passed
@kkamara
kkamara deleted the upgrade-python-django-4.0-to-5.2-lts branch August 19, 2026 14:19
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@kkamara