changeset 8370:cfce400b9684 stable

tg: clarify how ErrorController hooks into TG without using config/middleware.py
author Mads Kiilerich <mads@kiilerich.com>
date Fri, 24 Apr 2020 12:42:29 +0200
parents f5e0fa641336
children 3b1c53643b09
files kallithea/controllers/error.py kallithea/controllers/root.py
diffstat 2 files changed, 2 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/controllers/error.py	Mon Apr 27 11:31:26 2020 +0200
+++ b/kallithea/controllers/error.py	Fri Apr 24 12:42:29 2020 +0200
@@ -41,11 +41,8 @@
 class ErrorController(BaseController):
     """Generates error documents as and when they are required.
 
-    The ErrorDocuments middleware forwards to ErrorController when error
+    The errorpage middleware renders /error/document when error
     related status codes are returned from the application.
-
-    This behavior can be altered by changing the parameters to the
-    ErrorDocuments middleware in your config/middleware.py file.
     """
 
     def _before(self, *args, **kwargs):
--- a/kallithea/controllers/root.py	Mon Apr 27 11:31:26 2020 +0200
+++ b/kallithea/controllers/root.py	Fri Apr 24 12:42:29 2020 +0200
@@ -31,5 +31,5 @@
     def __init__(self):
         self.mapper = make_map(config)
 
-        # the following assignment hooks in error handling
+        # The URL '/error/document' (the default TG errorpage.path) should be handled by ErrorController.document
         self.error = ErrorController()