Преглед изворни кода

Add hapic debug mode feature

Guénaël Muller пре 7 година
родитељ
комит
ed3b5689fb
2 измењених фајлова са 3 додато и 1 уклоњено
  1. 2 1
      tracim/__init__.py
  2. 1 0
      tracim/config.py

+ 2 - 1
tracim/__init__.py Прегледај датотеку

53
     # set Hapic
53
     # set Hapic
54
     context = PyramidContext(
54
     context = PyramidContext(
55
         configurator=configurator,
55
         configurator=configurator,
56
-        default_error_builder=ErrorSchema()
56
+        default_error_builder=ErrorSchema(),
57
+        debug=app_config.DEBUG,
57
     )
58
     )
58
     hapic.set_context(context)
59
     hapic.set_context(context)
59
     context.handle_exception(NotFound, 404)
60
     context.handle_exception(NotFound, 404)

+ 1 - 0
tracim/config.py Прегледај датотеку

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