flask-mdform
An extension for Flask to generate Flask-WTF parsing Markdown based document using mdforms. Checkout the syntax in the mdform page.
Installation
pip install flask-mdform
Usage
Use it like this to create a WTForm compatible template:
or use it like this to create a WTForm compatible template that uses Bootstrap4.
>>> from flask_mdform import Markdown, FormExtension, flask_wtf_bs4
>>> md = Markdown(extensions = [FormExtension(formatter=flask_wtf_bs4("jQuery", "wtf."))])
>>> html = md.convert(text) # this is the jinja template with Flask WTForm and BS4
>>> form_dict = md.Form # this is the definition dict
Here, the two arguments in the formatter can be use it to customize it. “jQuery” is the name of the jQuery variable, “wtf.” is the prefix where WTForm bootstrap form_field function is located.
Other functions
use_mdform: decorator to be used in a flask route to parse, display, load and store form and its values.
form_to_dict: iterates through a filled form and returns a dictionary with the values in a json compatible format.
dict_to_formdict: iterates through a dict, parsing each value using the spec defined in form_cls.
from_mdfile: generates form metadata, template, form from markdown file.
from_mdstr: generates form metadata, template, form from markdown string.
See AUTHORS for a list of the maintainers.
To review an ordered list of notable changes for each version of a project, see CHANGES
Metadata
Release files for Flask-mdform 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| Flask-mdform-0.1.1.tar.gz | 16.5 kB | Without provenance | Details for Flask-mdform-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| Flask_mdform-0.1.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for Flask_mdform-0.1.1-py2.py3-none-any.whl |
Total release size: 20.5 kB
Release files / Flask-mdform-0.1.1.tar.gz
| Download URL | Flask-mdform-0.1.1.tar.gz |
|---|---|
| Size | 16.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2b33208e1e72e62f4ccd00f73be9463da0d877e7dde63b345930ab80fd20ffe1
|
|
BLAKE2b-256 checksum How to use checksums |
c6a4b32687d28235000197af3cb0fdc9b8cd19d4de313a93ece198b8cb9003a3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.2
|
Release files / Flask_mdform-0.1.1-py2.py3-none-any.whl
| Download URL | Flask_mdform-0.1.1-py2.py3-none-any.whl |
|---|---|
| Size | 3.9 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
4720f69d69a526e99eaa49e69d0b3ad63452b4c678c9cb56de4553b5287ef2a4
|
|
BLAKE2b-256 checksum How to use checksums |
1893b0a76bca8a9ecfacc84e499651895e6b663293fe8ec68934ac36223e4429
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.2
|
Security for Flask-mdform 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.