Giter Site home page Giter Site logo

wtforms-html5's People

Contributors

brutus avatar dependabot[bot] avatar gowee avatar pre-commit-ci[bot] avatar pyup-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

gowee evi1angel

wtforms-html5's Issues

running setup.cfg gives syntex error

i am installing the packeg on my raspi, i cloned the repository.
when i run setup.cfg it just goes side ways

File "/home/pi/wtforms-html5/setup.cfg", line 3
version = 0.4.0
^
SyntaxError: invalid syntax

DateField DataRequired always fails validation

Having an issue with a DateField where it always fails validation and triggers an error regardless of input.

close_date = DateField('Date Opportunity Closed', format='%d-%m-%Y', validators=[DataRequired()])

problem validating my DateField

i have a datefield in my web application, i used wtf-html5 to create the form
But form.validate always returns false.
here is my snippet
app/forms.py

class ProfileForm(Form):
    entrydate = DateField(
        'entrydate',
        format = '%d%m%Y'
    )

app/views.py

@app.route('/profile', methods = ['GET','POST'])
def profile():
    if request.method == 'POST':
        if form.validate():
            return form.entrydate.data 
        return 'bad form'
    return render_template('profile.html',form=form)

it keeps returning bad form

MonthInput does not regsiter data

I am using a MonthInput in the following way:

from flask_wtf import FlaskForm
from wtforms.fields import html5 as h5fields
from wtforms.widgets import html5 as h5widgets

class ImportForm(FlaskForm):
    month = h5fields.DateField("Month", widget=h5widgets.MonthInput(), validators=[DataRequired()])
    submit = SubmitField("Import")

However, when I submit the form with a value, the value is empty:

if form.validate_on_submit():
    pass
else:
    print(form.errors) # {'month': ['This field is required.']}

Why is this value not being passed correctly?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.