[Pkg-debile-commits] [debile-web] 02/10: Use flask-wtf for the forms

Sylvestre Ledru sylvestre at alioth.debian.org
Tue Aug 27 13:22:34 UTC 2013


This is an automated email from the git hooks/post-receive script.

sylvestre pushed a commit to branch update-usuability
in repository debile-web.

commit ed7dc30643fc926368f6a4f851265557af93d62d
Author: Sylvestre Ledru <sylvestre at debian.org>
Date:   Sat Aug 17 12:04:12 2013 +0200

    Use flask-wtf for the forms
---
 debile/blueprints/forms.py |    5 +++++
 requirements.txt           |    2 ++
 templates/search.html      |   13 +++++++++++++
 3 files changed, 20 insertions(+)

diff --git a/debile/blueprints/forms.py b/debile/blueprints/forms.py
new file mode 100644
index 0000000..67bbee8
--- /dev/null
+++ b/debile/blueprints/forms.py
@@ -0,0 +1,5 @@
+from flask.ext.wtf import Form, TextField, BooleanField
+from flask.ext.wtf import Required
+
+class SearchPackageForm(Form):
+    package = TextField('package', validators = [Required()])
diff --git a/requirements.txt b/requirements.txt
index a777262..0df8561 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,3 +1,5 @@
 flask
 humanize
 firehose
+flask-wtf
+
diff --git a/templates/search.html b/templates/search.html
new file mode 100644
index 0000000..f2f5a54
--- /dev/null
+++ b/templates/search.html
@@ -0,0 +1,13 @@
+
+<table><tr><td>By package</td><td>
+<form>
+    {{form.hidden_tag()}}
+        {{form.package(size=20)}} <input type="submit" value="Search" />
+</form>
+</td></tr>
+<tr><td>By maintainer</td><td>
+<form>
+<input type="text" /><input type="button" value="Search" />
+</form>
+</td></tr>
+</table>

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-debile/debile-web.git



More information about the Pkg-debile-commits mailing list