$def with (ip_address, onion, domains, settings, main_app, apps, webint_metadata, webint_versions)
$# , understory_version, applications)
$var title: System
Addresses
$ip_address
Domain Name System (DNS)
$if domains:
$", ".join(domains)
$elif tx.user.is_owner:
It is recommended that you add a domain name.
$if tx.user.is_owner:
The Onion Router (tor)
$if onion:
$(onion[:28])$(onion[28:])
$if tx.user.is_owner:
Software
$if tx.user.is_owner:
Primary application: $main_app.name
webint
version: $webint_versions[0]
$if webint_versions[1]:
out of date. current version is $webint_versions[1].
$# \
$# $for package, package_apps in sorted(apps.items(), key=lambda x: x[0].metadata["Name"]):
$# -
$# $package.metadata["Name"]
$#
$package.metadata["Version"]
$# $for mounted_prefix, mount_app in main_app.mounts:
$# $for _, package_app, _, _ in package_apps:
$# $if mount_app == package_app:
$# mounted at /$mounted_prefix
$#
$# $# $#app_name
$# $# $app.project_name
$# $# $app.version
$#
$#
$def render_parent_controllers(location, controllers):
$for route, controller in controllers:
-
$ parts = re.split(r"\(\?P<(.+?)>(.+?)\)", route)
$if len(parts) == 1:
$controller.__web__[0]\
$else:
$controller.__web__[0]\
$if len(controller.__web__[0]) == 0:
$tx.request.uri.host\
$ project_mod = "/".join(controller.handler.__module__.split("."))
$ project = getsourcefile(controller.handler).removeprefix(str(tx.host.working_dir)).lstrip("/").partition("/")[0]
$:str(mkdn((controller.__doc__.strip() + "\n").splitlines()[0])).removeprefix("").removesuffix("
")
Routes
$:render_parent_controllers("before", main_app.controllers)
$for prefix, subapp in sorted(main_app.mounts):
$if subapp.controllers:
-
$prefix\
$ root = subapp.controllers[0]
$if root[0] == "":
$ project_mod = "/".join(root[1].handler.__module__.split("."))
$ project = getsourcefile(root[1].handler).removeprefix(str(tx.host.working_dir)).lstrip("/").partition("/")[0]
$:str(mkdn((root[1].__doc__.strip() + "\n").splitlines()[0])).removeprefix("").removesuffix("
").rstrip()
$if len(subapp.controllers) > 1:
$for route, controller in subapp.controllers[1:]:
$ parts = re.split(r"\(\?P<(.+?)>(.+?)\)", route)
- \
$if len(parts) == 1:
$if parts[0]:
$parts[0]\
$else:
$for a, b, c in zip(parts[0::3], parts[1::3], parts[2::3]):
$:a.replace("(", '')\
{$b}\
$:parts[-1].replace(")?", "")\
$ project_mod = "/".join(controller.handler.__module__.split("."))
$ project = getsourcefile(controller.handler).removeprefix(str(tx.host.working_dir)).lstrip("/").partition("/")[0]
$ docstring = str(mkdn((controller.__doc__.strip() + "\n").splitlines()[0])).removeprefix("
").removesuffix("
").rstrip()
$docstring
$for app, app_details in apps.items():
$if prefix == app_details[0][0]:
$app.metadata["Summary"]
\
$if "Home-page" in app.metadata:
\
$app.project_name\
$if "Home-page" in app.metadata:
$app.version
by $app.metadata["Author"]
<$app.metadata["Author-email"]>
$:render_parent_controllers("after", main_app.after_controllers)
$:render_parent_controllers("after", main_app.unprefixed_controllers)
$if tx.user.is_owner:
Wrappers
$for wrapper in main_app.wrappers:
- $wrapper.__name__
$wrapper.__module__
$if tx.user.is_owner:
Settings
$for key, value in settings.items():
- $key:
$value
$# $def aside():
$# $#
$# $#
$# $# $for application in applications:
$# $# - $application.project_name
$# $# $application.version
$# $#
$# $#
$# $var aside = aside
$# XXX
$# XXX $for prefix, subapp in main_app.mounts:
$# XXX $if subapp.wrappers:
$# XXX $for wrapper in subapp.wrappers:
$# XXX - $wrapper
$# XXX