Initial commit

This commit is contained in:
2024-08-27 20:33:44 +02:00
commit 1f1832267d
14794 changed files with 1599592 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
class RouteResult:
"""
An object to be returned from Page.route, which encapsulates
all the information necessary to serve an HTTP response. Analogous to
django.urls.resolvers.ResolverMatch, except that it identifies
a Page instance that we will call serve(*args, **kwargs) on, rather
than a view function.
"""
def __init__(self, page, args=None, kwargs=None):
self.page = page
self.args = args or []
self.kwargs = kwargs or {}
def __getitem__(self, index):
return (self.page, self.args, self.kwargs)[index]