move everything to backend folder for migration to dashboard repository
This commit is contained in:
parent
af6b006409
commit
92ec7c653d
89 changed files with 0 additions and 0 deletions
17
backend/helpers/classes.py
Normal file
17
backend/helpers/classes.py
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
|
||||
"""Generic classes used by different parts of the application"""
|
||||
|
||||
import urllib.request
|
||||
|
||||
# Instead of processing the redirect, we return, so the application
|
||||
# can handle the redirect itself. This is needed to extract cookies
|
||||
# etc.
|
||||
class RedirectFilter(urllib.request.HTTPRedirectHandler):
|
||||
"""Overrides the standard redirect handler so it does not automatically
|
||||
redirect. This allows for inspecting the return values before redirecting or
|
||||
override the redirect action"""
|
||||
|
||||
# pylint: disable=too-many-arguments
|
||||
# This amount of arguments is expected by the HTTPRedirectHandler
|
||||
def redirect_request(self, req, fp, code, msg, headers, newurl):
|
||||
return None
|
||||
Reference in a new issue