Browse Source

permit personalisation of wsgidav config path

Bastien Sevajol (Algoo) 8 years ago
parent
commit
d67202303b
3 changed files with 8 additions and 1 deletions
  1. 3 0
      tracim/development.ini.base
  2. 2 0
      tracim/tracim/config/app_cfg.py
  3. 3 1
      tracim/tracim/lib/daemons.py

+ 3 - 0
tracim/development.ini.base View File

@@ -202,6 +202,9 @@ email.notification.smtp.password = your_smtp_password
202 202
 ## in this case, you have to create your own proxy behind this url.
203 203
 # radicale.client.base_url = http://127.0.0.1:5232
204 204
 
205
+## WSGIDAV
206
+wsgidav.config_path = wsgidav.conf
207
+
205 208
 #####
206 209
 #
207 210
 # All configuration below is about logging.

+ 2 - 0
tracim/tracim/config/app_cfg.py View File

@@ -296,6 +296,8 @@ class CFG(object):
296 296
             '604800',
297 297
         ))
298 298
 
299
+        self.WSGIDAV_CONFIG_PATH = tg.config.get('wsgidav.config_path')
300
+
299 301
     def get_tracker_js_content(self, js_tracker_file_path = None):
300 302
         js_tracker_file_path = tg.config.get('js_tracker_path', None)
301 303
         if js_tracker_file_path:

+ 3 - 1
tracim/tracim/lib/daemons.py View File

@@ -268,13 +268,15 @@ class WsgiDavDaemon(Daemon):
268 268
 
269 269
     def _initConfig(self):
270 270
         """Setup configuration dictionary from default, command line and configuration file."""
271
+        from tg import config as tg_config
271 272
 
272 273
         # Set config defaults
273 274
         config = DEFAULT_CONFIG.copy()
274 275
         temp_verbose = config["verbose"]
275 276
 
276 277
         # Configuration file overrides defaults
277
-        config_file = os.path.abspath(DEFAULT_CONFIG_FILE)
278
+        default_config_file = os.path.abspath(DEFAULT_CONFIG_FILE)
279
+        config_file = tg_config.get('wsgidav.config_path', default_config_file)
278 280
         fileConf = self._readConfigFile(config_file, temp_verbose)
279 281
         config.update(fileConf)
280 282