diff libervia/server/pages.py @ 1147:02afab1b15c5

server, pages, tasks: moved getConfig to backend, and added shorcut version in LiberviaPage and TasksManager
author Goffi <goffi@goffi.org>
date Sat, 26 Jan 2019 20:14:09 +0100
parents 76d75423ef53
children 3c7a64adfd42
line wrap: on
line diff
--- a/libervia/server/pages.py	Fri Jan 25 08:58:41 2019 +0100
+++ b/libervia/server/pages.py	Sat Jan 26 20:14:09 2019 +0100
@@ -392,6 +392,10 @@
         )
         request._signals_registered.append(signal)
 
+    def getConfig(self, key, default=None, value_type=None):
+        return self.host.getConfig(self.vhost_root, key=key, default=default,
+                                   value_type=value_type)
+
     def getBuildPath(self, session_data):
         return session_data.cache_dir + self.vhost.site_name