changed structure to package

This commit is contained in:
Johannes Gehrs
2013-06-24 23:28:32 +02:00
parent 75053a26e6
commit 945884b973
14 changed files with 17 additions and 14 deletions
+2 -1
View File
@@ -8,4 +8,5 @@ dist
*.egg-info
_mailinglist
.tox
.idea
.idea
build
-3
View File
@@ -1,3 +0,0 @@
[submodule "sample/static/scripts/parsleyjs"]
path = sample/static/scripts/parsleyjs
url = https://github.com/guillaumepotier/Parsley.js.git
+1
View File
@@ -0,0 +1 @@
web: gunicorn run:app
+4
View File
@@ -0,0 +1,4 @@
from wtformsparsleyjs.samples.sample import app
if __name__ == '__main__':
app.run(debug=True)
View File
+1
View File
@@ -0,0 +1 @@
__author__ = 'johannes'
+1
View File
@@ -0,0 +1 @@
__author__ = 'johannes'
@@ -1,6 +1,8 @@
__author__ = 'Johannes Gehrs (jgehrs@gmail.com)'
from flask import Flask, render_template, redirect, url_for, request, flash
from wtforms import Form, validators
from wtforms_parsleyjs import IntegerField, BooleanField, SelectField, TextField
from wtformsparsleyjs.core import IntegerField, BooleanField, SelectField, TextField
app = Flask(__name__)
@@ -55,8 +57,4 @@ class ParsleyTestForm(Form):
anyof = TextField('Car, Bike or Plane?', [
validators.AnyOf(message='Sorry, you can only choose from car, bike and plane',
values=['car', 'bike', 'plane'])
], default='car')
if __name__ == '__main__':
app.run(debug=True)
], default='car')
@@ -11,7 +11,7 @@
{% macro render_errors(field) %}
<span class="help-inline">
{% if field.errors %}
<ul>
<ul class="unstyled">
{% for error in field.errors %}
<li>{{ error }}</li>
{% endfor %}
@@ -56,9 +56,10 @@
var $container = element.parent().find(".help-inline");
if ($container.length === 0) {
$container = $("<span class='help-inline'></span>").insertAfter(element);
}
};
return $container;
}
},
errorsWrapper: '<ul class="unstyled"></ul>'
}});
</script>
{% endblock scripts %}