{ "info": { "author": "Zhiya Zang", "author_email": "zangzhiya@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "# Flask-WTF-Decorators [![Build Status](https://travis-ci.org/simpleapples/flask-wtf-decorators.svg?branch=master)](https://travis-ci.org/simpleapples/flask-wtf-decorators)\n\nUsing decorators to validate form.\n\n# Installation\n\nUsing pip\n\n`pip install flask-wtf-decorators`\n\nUsing Pipenv\n\n`pipenv install flask-wtf-decorators`\n\n# Usage\n\nFlask-WTF-Decorators is easy to use. You can define a view that requires validation.\n\n```python\nfrom flask-wtf-decorators import FormValidator\n\nform_validator = FormValidator()\n\n@form_validator.validate_form(TestForm)\n@app.route('/', methods=['GET', 'POST'])\ndef index(form):\n pass\n```\n\nYou can tell Flask-WTF-Decorators what to do when a form is illegal. To do this you should provide a callback for `error_handler`.\n\n```python\n@form_validator.error_handler\ndef error_handler(errors):\n return jsonify({'errors': errors}), 400\n```\n\n# Test\n\n`python -m unittest discover -s tests`\n\n# Contributing\n\nPlease submit a pull request to contribute.\n\n# License\n\nThis project is licensed under the MIT License.\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/simpleapples/flask-wtf-decorators/", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "Flask-WTF-Decorators", "package_url": "https://pypi.org/project/Flask-WTF-Decorators/", "platform": "any", "project_url": "https://pypi.org/project/Flask-WTF-Decorators/", "project_urls": { "Homepage": "https://github.com/simpleapples/flask-wtf-decorators/" }, "release_url": "https://pypi.org/project/Flask-WTF-Decorators/0.1.2/", "requires_dist": [ "Flask (>=0.7)", "Flask-WTF (>=0.9)" ], "requires_python": "", "summary": "Decorators for flask-wtf", "version": "0.1.2" }, "last_serial": 3808830, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "0e20abb35c1e965fd64c71770018fba2", "sha256": "59c501c8b52aa2b50ae8eda65743780227b13d39f05639a06a438de50a427827" }, "downloads": -1, "filename": "Flask_WTF_Decorators-0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0e20abb35c1e965fd64c71770018fba2", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 2645, "upload_time": "2018-04-24T09:48:25", "url": "https://files.pythonhosted.org/packages/dc/86/4a67373776ae63b988a25cde556631a914a03cbcaa553563c323af0e5703/Flask_WTF_Decorators-0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "17feb1cc96b4203980b2ff6f27b53d74", "sha256": "4d72cbc435ab0b2dd48a82b00477d918ebbfa9d6861de66ddc0dfa9ec27ce27e" }, "downloads": -1, "filename": "Flask-WTF-Decorators-0.1.tar.gz", "has_sig": false, "md5_digest": "17feb1cc96b4203980b2ff6f27b53d74", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2242, "upload_time": "2018-04-24T09:48:26", "url": "https://files.pythonhosted.org/packages/e4/3c/601ec0a3ac4ea8214f05281d329e6b5f95dc410709cba6d4ddc626831ae4/Flask-WTF-Decorators-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "1a4a3ee5dbcefb953d2b6612beaaf2e1", "sha256": "b657f9b13757566d21f3f5005f01547676f41898100458141986b811cba6218f" }, "downloads": -1, "filename": "Flask_WTF_Decorators-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "1a4a3ee5dbcefb953d2b6612beaaf2e1", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 3157, "upload_time": "2018-04-26T03:02:30", "url": "https://files.pythonhosted.org/packages/9a/e4/64d10f131541bae02f8585f5d9fb81bb3b44b6b1c8516811b9306ecd82ed/Flask_WTF_Decorators-0.1.1-py2.py3-none-any.whl" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "f29d9f54b8349f3c8e5ac2e9363f75d3", "sha256": "9f17b431edd6f28dcea388dc8c8e02b422a1015084d0bd716fbbef457c5be7e7" }, "downloads": -1, "filename": "Flask_WTF_Decorators-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "f29d9f54b8349f3c8e5ac2e9363f75d3", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 3145, "upload_time": "2018-04-26T03:06:03", "url": "https://files.pythonhosted.org/packages/e5/32/238f799563d6dadce1513aed451ca613c4717c00870b813586dae92ce0f7/Flask_WTF_Decorators-0.1.2-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f29d9f54b8349f3c8e5ac2e9363f75d3", "sha256": "9f17b431edd6f28dcea388dc8c8e02b422a1015084d0bd716fbbef457c5be7e7" }, "downloads": -1, "filename": "Flask_WTF_Decorators-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "f29d9f54b8349f3c8e5ac2e9363f75d3", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 3145, "upload_time": "2018-04-26T03:06:03", "url": "https://files.pythonhosted.org/packages/e5/32/238f799563d6dadce1513aed451ca613c4717c00870b813586dae92ce0f7/Flask_WTF_Decorators-0.1.2-py2.py3-none-any.whl" } ] }