diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2016-04-10 13:57:50 +0200 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2016-04-10 13:57:50 +0200 |
commit | 57b08c20597f24b46679e2d209b9e13886daa3e3 (patch) | |
tree | 091aba4476b2db7257e49e792269d1a15cb0e760 /src/web/forms.py | |
parent | Moved notifications module. (diff) | |
download | newspipe-57b08c20597f24b46679e2d209b9e13886daa3e3.tar.gz newspipe-57b08c20597f24b46679e2d209b9e13886daa3e3.tar.bz2 newspipe-57b08c20597f24b46679e2d209b9e13886daa3e3.zip |
Start to clean generic utils functions.
Diffstat (limited to 'src/web/forms.py')
-rw-r--r-- | src/web/forms.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/web/forms.py b/src/web/forms.py index fbfff85f..d1999b8b 100644 --- a/src/web/forms.py +++ b/src/web/forms.py @@ -35,7 +35,7 @@ from wtforms import TextField, TextAreaField, PasswordField, BooleanField, \ SubmitField, IntegerField, SelectField, validators, HiddenField from flask.ext.wtf.html5 import EmailField -from web import utils +from web.lib import misc_utils from web.controllers import UserController from web.models import User @@ -76,12 +76,12 @@ class RedirectForm(Form): def __init__(self, *args, **kwargs): Form.__init__(self, *args, **kwargs) if not self.next.data: - self.next.data = utils.get_redirect_target() or '' + self.next.data = misc_utils.get_redirect_target() or '' def redirect(self, endpoint='home', **values): - if utils.is_safe_url(self.next.data): + if misc_utils.is_safe_url(self.next.data): return redirect(self.next.data) - target = utils.get_redirect_target() + target = misc_utils.get_redirect_target() return redirect(target or url_for(endpoint, **values)) |