Browse Source

Radicale config in .ini

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

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

@@ -183,6 +183,14 @@ email.notification.smtp.port = 25
183 183
 email.notification.smtp.user = your_smtp_user
184 184
 email.notification.smtp.password = your_smtp_password
185 185
 
186
+## Radical (CalDav server) configuration
187
+# radicale.server.host = 0.0.0.0
188
+# radicale.server.port = 5232
189
+# radicale.server.ssl = false
190
+## If '', current host will be used
191
+# radicale.client.host = ''
192
+# radicale.client.port = 5232
193
+# radicale.client.ssl = false
186 194
 
187 195
 #####
188 196
 #

+ 7 - 6
tracim/tracim/config/app_cfg.py View File

@@ -202,14 +202,15 @@ class CFG(object):
202 202
             # ContentType.Folder -- Folder is skipped
203 203
         ]
204 204
 
205
-        self.RADICALE_SERVER_HOST = '0.0.0.0'
206
-        self.RADICALE_SERVER_PORT = 5232
205
+        self.RADICALE_SERVER_HOST = tg.config.get('radicale.server.host', '0.0.0.0')
206
+        self.RADICALE_SERVER_PORT = tg.config.get('radicale.server.port', 5232)
207 207
         # Note: Other parameters needed to work in SSL (cert file, etc)
208
-        self.RADICALE_SERVER_SSL = False
208
+        self.RADICALE_SERVER_SSL = asbool(tg.config.get('radicale.server.ssl', False))
209 209
 
210
-        self.RADICALE_CLIENT_HOST = None  # If None, current host will be used
211
-        self.RADICALE_CLIENT_PORT = 5232
212
-        self.RADICALE_CLIENT_SSL = False
210
+        # If None, current host will be used
211
+        self.RADICALE_CLIENT_HOST = tg.config.get('radicale.client.host', None)
212
+        self.RADICALE_CLIENT_PORT = tg.config.get('radicale.client.port', 5232)
213
+        self.RADICALE_CLIENT_SSL = asbool(tg.config.get('radicale.client.ssl', False))
213 214
 
214 215
 
215 216
     def get_tracker_js_content(self, js_tracker_file_path = None):