mirror of
https://github.com/wassname/wtforms-parsleyjs.git
synced 2026-06-27 16:18:03 +08:00
changed structure to package
This commit is contained in:
+2
-1
@@ -8,4 +8,5 @@ dist
|
||||
*.egg-info
|
||||
_mailinglist
|
||||
.tox
|
||||
.idea
|
||||
.idea
|
||||
build
|
||||
@@ -1,3 +0,0 @@
|
||||
[submodule "sample/static/scripts/parsleyjs"]
|
||||
path = sample/static/scripts/parsleyjs
|
||||
url = https://github.com/guillaumepotier/Parsley.js.git
|
||||
@@ -0,0 +1,4 @@
|
||||
from wtformsparsleyjs.samples.sample import app
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run(debug=True)
|
||||
Submodule sample/static/scripts/parsleyjs deleted from 4dfaaabfd0
@@ -0,0 +1 @@
|
||||
__author__ = 'johannes'
|
||||
@@ -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')
|
||||
+1
-1
@@ -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 %}
|
||||
Reference in New Issue
Block a user