Show More
@@ -204,6 +204,25 b' code needs the database to assign an "au' | |||
|
204 | 204 | a freshly created model object (before flushing, the ID attribute will |
|
205 | 205 | be ``None``). |
|
206 | 206 | |
|
207 | TurboGears2 DebugBar | |
|
208 | ^^^^^^^^^^^^^^^^^^^^ | |
|
209 | ||
|
210 | It is possible to enable the TurboGears2-provided DebugBar_, a toolbar overlayed | |
|
211 | over the Kallithea web interface, allowing you to see: | |
|
212 | ||
|
213 | * timing information of the current request, including profiling information | |
|
214 | * request data, including GET data, POST data, cookies, headers and environment | |
|
215 | variables | |
|
216 | * a list of executed database queries, including timing and result values | |
|
217 | ||
|
218 | DebugBar is only activated when ``debug = true`` is set in the configuration | |
|
219 | file. This is important, because the DebugBar toolbar will be visible for all | |
|
220 | users, and allow them to see information they should not be allowed to see. Like | |
|
221 | is anyway the case for ``debug = true``, do not use this in production! | |
|
222 | ||
|
223 | To enable DebugBar, install ``tgext.debugbar`` and ``kajiki`` (typically via | |
|
224 | ``pip``) and restart Kallithea (in debug mode). | |
|
225 | ||
|
207 | 226 | |
|
208 | 227 | "Roadmap" |
|
209 | 228 | --------- |
@@ -225,3 +244,4 b' Thank you for your contribution!' | |||
|
225 | 244 | .. _kallithea-general: http://lists.sfconservancy.org/mailman/listinfo/kallithea-general |
|
226 | 245 | .. _Hosted Weblate: https://hosted.weblate.org/projects/kallithea/kallithea/ |
|
227 | 246 | .. _wiki: https://bitbucket.org/conservancy/kallithea/wiki/Home |
|
247 | .. _DebugBar: https://github.com/TurboGears/tgext.debugbar |
@@ -96,6 +96,21 b' base_config = KallitheaAppConfig()' | |||
|
96 | 96 | # TODO still needed as long as we use pylonslib |
|
97 | 97 | sys.modules['pylons'] = tg |
|
98 | 98 | |
|
99 | # DebugBar, a debug toolbar for TurboGears2. | |
|
100 | # (https://github.com/TurboGears/tgext.debugbar) | |
|
101 | # To enable it, install 'tgext.debugbar' and 'kajiki', and run Kallithea with | |
|
102 | # 'debug = true' (not in production!) | |
|
103 | # See the Kallithea documentation for more information. | |
|
104 | try: | |
|
105 | from tgext.debugbar import enable_debugbar | |
|
106 | import kajiki # only to check its existence | |
|
107 | except ImportError: | |
|
108 | pass | |
|
109 | else: | |
|
110 | base_config['renderers'].append('kajiki') | |
|
111 | enable_debugbar(base_config) | |
|
112 | ||
|
113 | ||
|
99 | 114 | def setup_configuration(app): |
|
100 | 115 | config = app.config |
|
101 | 116 |
General Comments 0
You need to be logged in to leave comments.
Login now