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))
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))