When a user is accessing a certain controller and if a condition is met, then i want to redirect user to some other page but when I'am trying that it throwing "Resource was found at exception". Below is the code which I'm trying.
@expose("sample.templates.show_id")
def show_id(self, **kw):
try:
if kw['u']==1:
redirect ("/")
else:
groups = self.handle_u(kw['u'])
except Exception as e:
print str(e)
return dict(groups=groups)
When the kw['u']==1, then it is not taking me to the index page, but throwing the mentioned error. Please suggest me how to proceed.