Browse Source

Add uuid for tracim instance in config

Guénaël Muller 6 years ago
parent
commit
988380f6bd
2 changed files with 5 additions and 0 deletions
  1. 2 0
      tracim/development.ini.base
  2. 3 0
      tracim/tracim/config/app_cfg.py

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

35
 # Fallback language if browser and tracim can't find one they agree on.
35
 # Fallback language if browser and tracim can't find one they agree on.
36
 i18n.lang = en
36
 i18n.lang = en
37
 
37
 
38
+tracim_instance.uuid = 79160afe-e324-473a-9aef-7b93f69c1c1b
39
+
38
 cache_dir = %(here)s/data
40
 cache_dir = %(here)s/data
39
 # preview generator cache directory
41
 # preview generator cache directory
40
 preview_cache_dir = /tmp/tracim/preview/
42
 preview_cache_dir = /tmp/tracim/preview/

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

217
         """Parse configuration file."""
217
         """Parse configuration file."""
218
         mandatory_msg = \
218
         mandatory_msg = \
219
             'ERROR: {} configuration is mandatory. Set it before continuing.'
219
             'ERROR: {} configuration is mandatory. Set it before continuing.'
220
+        self.TRACIM_INSTANCE_UUID = tg.config.get(
221
+            'tracim_instance.uuid',
222
+        )
220
         self.DEPOT_STORAGE_DIR = tg.config.get(
223
         self.DEPOT_STORAGE_DIR = tg.config.get(
221
             'depot_storage_dir',
224
             'depot_storage_dir',
222
         )
225
         )