changeset 1151:49ff1330c9d0

server: added "dev_mode" boolean option (not used yet but will be soon)
author Goffi <goffi@goffi.org>
date Fri, 22 Feb 2019 16:56:58 +0100
parents 0effdb357a87
children 1c23252958ed
files libervia/server/server.py twisted/plugins/libervia_server.py
diffstat 2 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libervia/server/server.py	Wed Feb 06 09:19:33 2019 +0100
+++ b/libervia/server/server.py	Fri Feb 22 16:56:58 2019 +0100
@@ -1835,6 +1835,8 @@
 
     @defer.inlineCallbacks
     def backendReady(self, __):
+        if self.options[u'dev_mode']:
+            log.info(_(u"Developer mode activated"))
         self.media_dir = self.bridge.getConfig("", "media_dir")
         self.local_dir = self.bridge.getConfig("", "local_dir")
         self.cache_root_dir = os.path.join(self.local_dir, C.CACHE_DIR)
--- a/twisted/plugins/libervia_server.py	Wed Feb 06 09:19:33 2019 +0100
+++ b/twisted/plugins/libervia_server.py	Fri Feb 22 16:56:58 2019 +0100
@@ -152,6 +152,8 @@
                        ['base_url_ext', '', '',
                         _(u'The external URL to use as base URL').encode('utf-8'),
                         coerceUnicode],
+                       ['dev_mode', 'D', False, _(u'Developer mode, automatically reload'
+                        u'modified pages').encode('utf-8'), coerceBool],
                       ]
 # Options which are in sat.conf only
 OPT_PARAMETERS_CFG = [