Skip to content

Commit

Permalink
Upgrade to Django 4.2
Browse files Browse the repository at this point in the history
Django 3.2 is past EOL and 4.2 is the current LTS version. There are not
many changes that seem to directly affect us, and we can simply run the
third-party django-upgrade command to take care of a few minor updates.
  • Loading branch information
kfdm committed Apr 11, 2024
1 parent 3d1ac57 commit ce25b00
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 11 deletions.
3 changes: 1 addition & 2 deletions docker/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ defusedxml==0.7.1
# via
# python3-openid
# social-auth-core
django==3.2.24
django==4.2.11
# via
# django-filter
# djangorestframework
Expand Down Expand Up @@ -71,7 +71,6 @@ python3-openid==3.2.0
pytz==2023.3
# via
# celery
# django
# djangorestframework
pyyaml==6.0.1
# via promgen (pyproject.toml)
Expand Down
2 changes: 1 addition & 1 deletion promgen/management/commands/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

class Command(BaseCommand):
# We manually run the system checks at the end
requires_system_checks = False
requires_system_checks = []

def prompt(self, prompt, *args, **kwargs):
return input(prompt.format(*args, **kwargs))
Expand Down
2 changes: 0 additions & 2 deletions promgen/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,6 @@

USE_I18N = True

USE_L10N = True

USE_TZ = True


Expand Down
2 changes: 1 addition & 1 deletion promgen/templatetags/promgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from django.urls import reverse
from django.utils.html import format_html
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext as _
from django.utils.translation import gettext as _
from pytz import timezone

from promgen import util
Expand Down
6 changes: 3 additions & 3 deletions promgen/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
1. Import the include() function: from django.conf.urls import url, include
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.conf.urls import url
from django.urls import path
from django.contrib import admin
from django.urls import include, path
from django.views.decorators.csrf import csrf_exempt
Expand Down Expand Up @@ -101,8 +101,8 @@
path("alert", views.AlertList.as_view(), name="alert-list"),
path("alert/<int:pk>", views.AlertDetail.as_view(), name="alert-detail"),
# Third Party / Auth
url("", include("django.contrib.auth.urls")),
url("", include("social_django.urls", namespace="social")),
path("", include("django.contrib.auth.urls")),
path("", include("social_django.urls", namespace="social")),
# Legacy API
path("api/v1/config", csrf_exempt(views.ApiConfig.as_view())),
path("api/", include((router.urls, "api"), namespace="old-api")),
Expand Down
2 changes: 1 addition & 1 deletion promgen/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from django.shortcuts import get_object_or_404, redirect, render
from django.template.loader import render_to_string
from django.urls import reverse
from django.utils.translation import ugettext as _
from django.utils.translation import gettext as _
from django.views.generic import DetailView, ListView, UpdateView, View
from django.views.generic.base import RedirectView, TemplateView
from django.views.generic.detail import SingleObjectMixin
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ classifiers = [
readme = { file = "README.md", content-type = "text/markdown" }
requires-python = ">=3.9"
dependencies = [
"Django~=3.2",
"Django~=4.2",
"atomicwrites",
"celery==4.3.0",
"django-environ",
Expand Down

0 comments on commit ce25b00

Please sign in to comment.