Esempio n. 1
0
 def redirect(self, endpoint="home", **values):
     if misc_utils.is_safe_url(self.next.data):
         return redirect(self.next.data)
     target = misc_utils.get_redirect_target()
     return redirect(target or url_for(endpoint, **values))
Esempio n. 2
0
File: forms.py Progetto: JARR/JARR
 def redirect(self, endpoint='home', **values):
     if misc_utils.is_safe_url(self.next.data):
         return redirect(self.next.data)
     target = misc_utils.get_redirect_target()
     return redirect(target or url_for(endpoint, **values))