1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Miscellaneous cleanup

This commit is contained in:
Jeremy Stretch
2019-10-04 12:08:48 -04:00
parent 6f83fca216
commit a3b9bdaff1
32 changed files with 36 additions and 56 deletions

View File

@ -1,8 +1,9 @@
from urllib import parse
from django.conf import settings
from django.db import ProgrammingError
from django.http import Http404, HttpResponseRedirect
from django.urls import reverse
import urllib
from .views import server_error
@ -26,7 +27,7 @@ class LoginRequiredMiddleware(object):
return HttpResponseRedirect(
'{}?next={}'.format(
settings.LOGIN_URL,
urllib.parse.quote(request.get_full_path_info())
parse.quote(request.get_full_path_info())
)
)
return self.get_response(request)