def redirect(self, action, **kwargs):
""" sets the given action and executes it so that all prerequisites are correct """
self.setCurrentAction(action)
return eval("self." + action + "(**kwargs)")
should be replaced by:
def redirect(self, action, **kwargs):
""" sets the given action and executes it so that all prerequisites are correct """
self.setCurrentAction(action)
return getattr(self, action)(**kwargs)
example: from BaseController.py (ln. 175-178):
should be replaced by:
A more secure and pythonic solution.
thanks to microkernel (user from the www.python-forum.de) see post: http://www.python-forum.de/viewtopic.php?f=9&t=29801