aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r/forms.py
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2015-04-12 17:03:20 +0200
committerCédric Bonhomme <cedric@cedricbonhomme.org>2015-04-12 17:03:20 +0200
commit9a9b5c19d8c07026b104ed81838145454bfa9fc9 (patch)
tree054d348fd66b9c196545037077d6ac3f64b158c5 /pyaggr3g470r/forms.py
parentMerged in jaesivsm/pyaggr3g470r (pull request #8) (diff)
downloadnewspipe-9a9b5c19d8c07026b104ed81838145454bfa9fc9.tar.gz
newspipe-9a9b5c19d8c07026b104ed81838145454bfa9fc9.tar.bz2
newspipe-9a9b5c19d8c07026b104ed81838145454bfa9fc9.zip
It is now possible to add a new feed from any page via a dropdown menu.
Diffstat (limited to 'pyaggr3g470r/forms.py')
-rw-r--r--pyaggr3g470r/forms.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/pyaggr3g470r/forms.py b/pyaggr3g470r/forms.py
index e385c4e2..fb4a829c 100644
--- a/pyaggr3g470r/forms.py
+++ b/pyaggr3g470r/forms.py
@@ -87,11 +87,16 @@ class SigninForm(Form):
class AddFeedForm(Form):
title = TextField(lazy_gettext("Title"), [validators.Optional()])
- link = TextField(lazy_gettext("Feed link"), [validators.Optional()])
- site_link = TextField(lazy_gettext("Site link"))
+ link = TextField(lazy_gettext("Feed link"))
+ site_link = TextField(lazy_gettext("Site link"), [validators.Optional()])
enabled = BooleanField(lazy_gettext("Check for updates"), default=True)
submit = SubmitField(lazy_gettext("Save"))
+ def validate(self):
+ if not super(AddFeedForm, self).validate():
+ return False
+ return True
+
class ProfileForm(Form):
nickname = TextField(lazy_gettext("Nickname"),
bgstack15