Browse Source

Add hapic debug mode feature

Guénaël Muller 6 years ago
parent
commit
ed3b5689fb
2 changed files with 3 additions and 1 deletions
  1. 2 1
      tracim/__init__.py
  2. 1 0
      tracim/config.py

+ 2 - 1
tracim/__init__.py View File

@@ -53,7 +53,8 @@ def main(global_config, **settings):
53 53
     # set Hapic
54 54
     context = PyramidContext(
55 55
         configurator=configurator,
56
-        default_error_builder=ErrorSchema()
56
+        default_error_builder=ErrorSchema(),
57
+        debug=app_config.DEBUG,
57 58
     )
58 59
     hapic.set_context(context)
59 60
     context.handle_exception(NotFound, 404)

+ 1 - 0
tracim/config.py View File

@@ -128,6 +128,7 @@ class CFG(object):
128 128
             '604800',
129 129
         ))
130 130
 
131
+        self.DEBUG = asbool(settings.get('debug', False))
131 132
         # TODO - G.M - 27-03-2018 - [Email] Restore email config
132 133
         ###
133 134
         # EMAIL related stuff (notification, reply)