M qwertywar/urls.py +4 -4
@@ 1,9 1,9 @@
-from django.conf.urls import url
+from django.urls import path
from .views import *
urlpatterns = [
- url('^$', index),
- url('^about$', about),
- url('^leaderboard$', LeaderboardView.as_view())
+ path('', index),
+ path('about', about),
+ path('leaderboard', LeaderboardView.as_view())
]
M qwertywar/views.py +2 -1
@@ 5,6 5,7 @@ from urllib.parse import urlencode
from django.forms import ModelForm
from django.http import HttpResponseRedirect
from django.shortcuts import render
+from django.utils.decorators import method_decorator
from django.views import View
from django.views.decorators.cache import cache_control
@@ 44,7 45,7 @@ class LeaderboardView(View):
url_params = {'focus_id': score.id}
return HttpResponseRedirect('leaderboard?' + urlencode(url_params))
- @cache_control(max_age=0, must_revalidate=True)
+ @method_decorator(cache_control(max_age=0, must_revalidate=True))
def get(self, request):
try:
focus_id = int('focus_id' in request.GET and request.GET['focus_id'])
M requirements.txt +5 -5
@@ 1,6 1,6 @@
-asgiref==3.4.1
-Django==3.2.22
-psycopg2==2.9.8
-pytz==2023.3.post1
+asgiref==3.8.1
+Django==5.0.3
+psycopg2==2.9.9
+pytz==2024.1
sqlparse==0.4.4
-typing-extensions==4.1.1
+typing_extensions==4.10.0