Browse Source

merge with upstream

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

+ 3 - 1
tracim/__init__.py View File

59
     # set Hapic
59
     # set Hapic
60
     context = PyramidContext(
60
     context = PyramidContext(
61
         configurator=configurator,
61
         configurator=configurator,
62
-        default_error_builder=ErrorSchema()
62
+        default_error_builder=ErrorSchema(),
63
+        debug=app_config.DEBUG,
63
     )
64
     )
64
     hapic.set_context(context)
65
     hapic.set_context(context)
65
     context.handle_exception(NotFound, 404)
66
     context.handle_exception(NotFound, 404)
66
     context.handle_exception(OperationalError, 500)
67
     context.handle_exception(OperationalError, 500)
68
+    context.handle_exception(Exception, 500)
67
     # Add controllers
69
     # Add controllers
68
     session_controller = SessionController()
70
     session_controller = SessionController()
69
     system_controller = SystemController()
71
     system_controller = SystemController()

+ 1 - 0
tracim/config.py View File

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