Quellcode durchsuchen

Add hapic debug mode feature

Guénaël Muller vor 6 Jahren
Ursprung
Commit
ed3b5689fb
2 geänderte Dateien mit 3 neuen und 1 gelöschten Zeilen
  1. 2 1
      tracim/__init__.py
  2. 1 0
      tracim/config.py

+ 2 - 1
tracim/__init__.py Datei anzeigen

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 Datei anzeigen

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)