From 3c6bc705bca6bacb34ca8f667ada6e5a7aaf1b13 Mon Sep 17 00:00:00 2001 From: Khalegh-H3 Date: Tue, 29 Nov 2016 12:19:42 -0800 Subject: [PATCH] Moved ErrorController rout to right after plugins custom routs. --- ckan/config/routing.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ckan/config/routing.py b/ckan/config/routing.py index 513e641acf1..5f3a4910ee1 100644 --- a/ckan/config/routing.py +++ b/ckan/config/routing.py @@ -93,6 +93,10 @@ def make_map(): map.minimization = False map.explicit = True + # CUSTOM ROUTES HERE + for plugin in p.PluginImplementations(p.IRoutes): + map = plugin.before_map(map) + # The ErrorController route (handles 404/500 error pages); it should # likely stay at the top, ensuring it can always be resolved. map.connect('/error/{action}', controller='error', ckan_core=True) @@ -101,10 +105,6 @@ def make_map(): map.connect('*url', controller='home', action='cors_options', conditions=OPTIONS, ckan_core=True) - # CUSTOM ROUTES HERE - for plugin in p.PluginImplementations(p.IRoutes): - map = plugin.before_map(map) - # Mark all routes added from extensions on the `before_map` extension point # as non-core for route in map.matchlist: