2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2025-12-14 05:55:06 +00:00

ruf cleanup imports, bigly.

This commit is contained in:
2023-01-30 23:04:11 +00:00
parent e35fccea5d
commit 3aca0d0c76
29 changed files with 165 additions and 325 deletions

View File

@@ -1,6 +1,6 @@
from django import http
from django.conf import settings
from django.urls import Resolver404, resolve, reverse
from django.urls import Resolver404, resolve
"""Non-standard django middleware is loaded from this file.
@@ -66,7 +66,7 @@ class SmartAppendSlashMiddleware(object):
def _resolves(url):
try:
# If the URL does not resolve, the function raises a Resolver404 exception (a subclass of Http404)
match = resolve(url)
resolve(url)
# this will ALWAYS be resolved by expopages because it will produce pagenotfound if not the thing asked for
# so handle this in expopages, not in middleware
return True