Exemplo n.º 1
0
 def __init__(self, *args, **kwargs):
     Form.__init__(self, *args, **kwargs)
     if not self.next.data:
         self.next.data = get_redirect_target() or ''
Exemplo n.º 2
0
 def __init__(self, *args, **kwargs):
     Form.__init__(self, *args, **kwargs)
     if not self.next.data:
         self.next.data = get_redirect_target() or ''
Exemplo n.º 3
0
 def redirect(self, endpoint='index', **values):
     if is_safe_url(self.next.data):
         return redirect(self.next.data)
     target = get_redirect_target()
     return redirect(target or url_for(endpoint, **values))
Exemplo n.º 4
0
 def redirect(self, endpoint='index', **values):
     if is_safe_url(self.next.data):
         return redirect(self.next.data)
     target = get_redirect_target()
     return redirect(target or url_for(endpoint, **values))