From 32e0c779b6168cdbe7510fff9b0dcd764ef9b9fb Mon Sep 17 00:00:00 2001 From: Sajith Sasidharan Date: Tue, 28 Apr 2020 07:56:27 -0400 Subject: [PATCH] Add version renderer --- src/allmydata/web/root.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/allmydata/web/root.py b/src/allmydata/web/root.py index 1a09f2074..e61ac932e 100644 --- a/src/allmydata/web/root.py +++ b/src/allmydata/web/root.py @@ -255,9 +255,6 @@ class Root(MultiFormatResource): # Render "/" path. return self - def data_version(self, ctx, data): - return get_package_versions_string() - def data_import_path(self, ctx, data): return str(allmydata) @@ -630,3 +627,8 @@ class RootElement(Element): @renderer def rendered_at(self, req, tag): return render_time(time.time()) + + @renderer + def version(self, req, tag): + return get_package_versions_string() +