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
 ## in this case, you have to create your own proxy behind this url.
202
 ## in this case, you have to create your own proxy behind this url.
203
 # radicale.client.base_url = http://127.0.0.1:5232
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
 # All configuration below is about logging.
210
 # All configuration below is about logging.

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

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

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

268
 
268
 
269
     def _initConfig(self):
269
     def _initConfig(self):
270
         """Setup configuration dictionary from default, command line and configuration file."""
270
         """Setup configuration dictionary from default, command line and configuration file."""
271
+        from tg import config as tg_config
271
 
272
 
272
         # Set config defaults
273
         # Set config defaults
273
         config = DEFAULT_CONFIG.copy()
274
         config = DEFAULT_CONFIG.copy()
274
         temp_verbose = config["verbose"]
275
         temp_verbose = config["verbose"]
275
 
276
 
276
         # Configuration file overrides defaults
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
         fileConf = self._readConfigFile(config_file, temp_verbose)
280
         fileConf = self._readConfigFile(config_file, temp_verbose)
279
         config.update(fileConf)
281
         config.update(fileConf)
280
 
282