Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Django 42: Fixing incorrect use of Signature. #49

Merged
merged 2 commits into from
Nov 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions imagefit/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from django.core.cache import caches
from django.utils.http import http_date
from django.views.static import was_modified_since
from inspect import Signature
from inspect import signature


from imagefit.conf import settings
Expand Down Expand Up @@ -46,7 +46,7 @@ def resize(request, path_name, format, url):
statobj = os.stat(image.path)

# django.views.static.was_modified_since dropped its size argument in 4.1.
sig = Signature(was_modified_since)
sig = signature(was_modified_since)

if not sig.parameters.get('size'):
if not was_modified_since(request.META.get('HTTP_IF_MODIFIED_SINCE'),
Expand Down