Complete admin package restructuring
This commit is contained in:
@ -0,0 +1,13 @@
|
||||
"""Frontend exceptions."""
|
||||
from starlette.datastructures import URL
|
||||
|
||||
|
||||
class RedirectException(Exception):
|
||||
"""Exception that initiates a redirect flow."""
|
||||
|
||||
def __init__(self, to: str | URL) -> None: # pyright: ignore[reportMissingSuperCall]
|
||||
"""Raise exception that redirects."""
|
||||
if isinstance(to, str):
|
||||
to = URL(to)
|
||||
|
||||
self.to: URL = to
|
||||
Reference in New Issue
Block a user