From 6c76c8d76e460e25349e3c8b43f8cf87e4b44b5b Mon Sep 17 00:00:00 2001 From: Holger Frey Date: Tue, 10 Oct 2017 10:53:58 +0200 Subject: [PATCH] redirecting from old orders list view to new url --- ordr2/views/orders.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ordr2/views/orders.py b/ordr2/views/orders.py index aef6cdb..63c21c6 100644 --- a/ordr2/views/orders.py +++ b/ordr2/views/orders.py @@ -38,6 +38,16 @@ def change_in_order_status(request, order, old): request.registry.notify(event) +@view_config( + context='ordr2:resources.OrderList', + name='view', + permission='view' + ) +def old_list_redirect(context, request): + ''' redirect the old /orders/view/ path to /orders/ ''' + return HTTPFound(context.url()) + + # oder list @view_config(