[Mpuls-commits] r5833 - base/trunk/mpulsweb/controllers
scm-commit at wald.intevation.org
scm-commit at wald.intevation.org
Mon Feb 27 11:14:51 CET 2012
Author: roland
Date: 2012-02-27 11:14:50 +0100 (Mon, 27 Feb 2012)
New Revision: 5833
Modified:
base/trunk/mpulsweb/controllers/document.py
Log:
Replace the deprecated redirect_to() with redirect(url())
Modified: base/trunk/mpulsweb/controllers/document.py
===================================================================
--- base/trunk/mpulsweb/controllers/document.py 2012-02-27 10:11:30 UTC (rev 5832)
+++ base/trunk/mpulsweb/controllers/document.py 2012-02-27 10:14:50 UTC (rev 5833)
@@ -31,11 +31,14 @@
import logging
import formencode
+from pylons import url
+from pylons.controllers.util import redirect
+
from mpulsweb.lib.translation import _
import paste
-from mpulsweb.lib.base import BaseController, c, h, redirect_to, render, \
+from mpulsweb.lib.base import BaseController, c, h, render, \
request, g, session
from mpulsweb.lib.security import checkRole
from mpulsweb.lib.validators import UploadGlobalDocumentForm, \
@@ -52,7 +55,7 @@
@checkRole(('admin', 'cm'))
def index(self):
- redirect_to(action='globalOverview')
+ redirect(url(action='globalOverview'))
@checkRole(('admin', 'cm'))
def globalOverview(self):
@@ -121,7 +124,7 @@
return data(request.environ, self.start_response)
except Exception, e:
log.exception(e)
- redirect_to(controller="case", action="documents", id=case)
+ redirect(url(controller="case", action="documents", id=case))
@checkRole('admin')
def globalDelete(self, id, confirmed='0'):
More information about the Mpuls-commits
mailing list