Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added mention of HTML5 fields in the docs #326

Merged
merged 1 commit into from Jun 12, 2018
Merged

Conversation

Deathnerd
Copy link
Contributor

@Deathnerd Deathnerd commented Mar 6, 2017

Per request of #275, adding the HTML5 fields to the Fields documentation

@davidism
Copy link
Member

@davidism davidism commented Mar 6, 2017

Looks like you used a different email than the one associated with your GitHub account. If you want to change that, you can use git commit --author "Name <email>" --amend then git push -f.

@Deathnerd
Copy link
Contributor Author

@Deathnerd Deathnerd commented Mar 6, 2017

Thanks for that!

Copy link

@benasocj benasocj left a comment

It would be great if you could please use the proper backtick notation in your change.

------------

In addition to basic HTML fields, WTForms also supplies fields for the HTML5
standard. These fields can be accessed under the `wtforms.fields.html5` namespace.
Copy link

@benasocj benasocj Mar 7, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Decorate `wtforms.fields.html5` as :mod:`wtforms.fields.html5` .

In addition to basic HTML fields, WTForms also supplies fields for the HTML5
standard. These fields can be accessed under the `wtforms.fields.html5` namespace.
In reality, these fields are just convenience fields that extend basic fields
and implement HTML5 specific widgets. These widgets are located in the `wtforms.widgets.html5`
Copy link

@benasocj benasocj Mar 7, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use :mod: here as well.

namespace and can be overridden or modified just like any other widget.

.. autoclass:: SearchField(default field arguments)
Represents an `<input type="search">` field
Copy link

@benasocj benasocj Mar 7, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use `` instead of ` to decorate all HTML code.

Represents an `<input type="datetime-local">` field

.. autoclass:: IntegerField(default field arguments)
Represents an `<input type="number">` field with the `step="1"` attribute
Copy link

@benasocj benasocj Mar 7, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also use `` instead of ` here and below for the HTML step attribute.

@Deathnerd
Copy link
Contributor Author

@Deathnerd Deathnerd commented Mar 8, 2017

Thanks for the suggestions. I'll clean these up tomorrow and push them up

Copy link
Member

@davidism davidism left a comment

All the classes already have docstrings, they shouldn't be copied into the docs, autoclass will take care of that.

@Deathnerd
Copy link
Contributor Author

@Deathnerd Deathnerd commented Mar 9, 2017

Cool. I'm still learning how Sphinx works. Thanks for the heads up!

@Deathnerd
Copy link
Contributor Author

@Deathnerd Deathnerd commented Mar 13, 2017

I'm having some issues with building. Sphinx doesn't seem to like the fact that these classes are in the html5 module. I would really like to continue using autoclass without messing up the module scope for the rest of the document. Thoughts?

@ftm
Copy link
Contributor

@ftm ftm commented Jun 12, 2018

@davidism, what are the changes that still need to be done to get this sorted? This seems like something that really should be in the docs so I'm happy to make the changes myself.

@ftm ftm added the enhancement label Jun 12, 2018
@davidism
Copy link
Member

@davidism davidism commented Jun 12, 2018

Does it build? Looks fine otherwise.

@ftm ftm merged commit f85c9e2 into wtforms:master Jun 12, 2018
2 checks passed
@ftm
Copy link
Contributor

@ftm ftm commented Jun 12, 2018

It didn't build, it needed a few changes so I made those and merged it in a separate PR #409 but it should also realise this has been merged too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement
Development

Successfully merging this pull request may close these issues.

None yet

4 participants