{"id":13594519,"url":"https://github.com/helloflask/bootstrap-flask","last_synced_at":"2025-05-13T19:11:24.390Z","repository":{"id":39905839,"uuid":"121000770","full_name":"helloflask/bootstrap-flask","owner":"helloflask","description":"Bootstrap 4 \u0026 5 helper for your Flask projects.","archived":false,"fork":false,"pushed_at":"2025-05-02T15:38:09.000Z","size":6005,"stargazers_count":1157,"open_issues_count":42,"forks_count":190,"subscribers_count":28,"default_branch":"main","last_synced_at":"2025-05-05T13:22:38.329Z","etag":null,"topics":["bootstrap","bootstrap-flask","bootstrap4","bootstrap5","flask","flask-bootstrap","flask-sqlalchemy","flask-wtf","jinja2","python","wtforms"],"latest_commit_sha":null,"homepage":"https://bootstrap-flask.readthedocs.io","language":"SCSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/helloflask.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.rst","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":null,"patreon":null,"open_collective":"bootstrap-flask","ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2018-02-10T09:06:04.000Z","updated_at":"2025-05-02T15:34:05.000Z","dependencies_parsed_at":"2023-11-07T17:09:45.676Z","dependency_job_id":"e09b3b6f-082d-4ff4-9b22-bdaef6d9ea41","html_url":"https://github.com/helloflask/bootstrap-flask","commit_stats":{"total_commits":449,"total_committers":36,"mean_commits":"12.472222222222221","dds":0.2538975501113586,"last_synced_commit":"67ece131da2f76ecd3736b3b9a76532289d866ee"},"previous_names":[],"tags_count":36,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helloflask%2Fbootstrap-flask","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helloflask%2Fbootstrap-flask/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helloflask%2Fbootstrap-flask/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helloflask%2Fbootstrap-flask/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/helloflask","download_url":"https://codeload.github.com/helloflask/bootstrap-flask/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252902614,"owners_count":21822261,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bootstrap","bootstrap-flask","bootstrap4","bootstrap5","flask","flask-bootstrap","flask-sqlalchemy","flask-wtf","jinja2","python","wtforms"],"created_at":"2024-08-01T16:01:34.892Z","updated_at":"2025-05-13T19:11:24.367Z","avatar_url":"https://github.com/helloflask.png","language":"SCSS","readme":"# Bootstrap-Flask\n\n![PyPI - License](https://img.shields.io/pypi/l/bootstrap-flask)\n[![Current version on PyPI](https://img.shields.io/pypi/v/bootstrap-flask)](https://pypi.org/project/bootstrap-flask/)\n[![Build status](https://github.com/helloflask/bootstrap-flask/workflows/build/badge.svg)](https://github.com/helloflask/bootstrap-flask/actions)\n[![Coverage Status](https://coveralls.io/repos/github/helloflask/bootstrap-flask/badge.svg?branch=main)](https://coveralls.io/github/helloflask/bootstrap-flask?branch=main)\n[![Open Collective](https://img.shields.io/opencollective/all/bootstrap-flask)](https://opencollective.com/bootstrap-flask)\n\nBootstrap-Flask is a collection of Jinja macros for Bootstrap 4 \u0026 5 and Flask. It helps you to\nrender Flask-related data and objects to Bootstrap markup HTML more easily:\n\n- Render Flask-WTF/WTForms form object to Bootstrap Form.\n- Render data objects (dict or class objects) to Bootstrap Table.\n- Render Flask-SQLAlchemy `Pagination` object to Bootstrap Pagination.\n- etc.\n\n\n## Installation\n\n```\n$ pip install -U bootstrap-flask\n```\n\n## Example\n\nRegister the extension:\n\n```python\nfrom flask import Flask\n# To follow the naming rule of Flask extension, although\n# this project's name is Bootstrap-Flask, the actual package\n# installed is named `flask_bootstrap`.\nfrom flask_bootstrap import Bootstrap5\n\napp = Flask(__name__)\nbootstrap = Bootstrap5(app)\n```\n\nAssuming you have a Flask-WTF form like this:\n\n```python\nclass LoginForm(FlaskForm):\n    username = StringField('Username', validators=[DataRequired(), Length(1, 20)])\n    password = PasswordField('Password', validators=[DataRequired(), Length(8, 150)])\n    remember = BooleanField('Remember me')\n    submit = SubmitField()\n```\n\nNow with the `render_form` macro:\n\n```html\n{% from 'bootstrap5/form.html' import render_form %}\n\u003chtml\u003e\n\u003chead\u003e\n\u003c!-- Bootstrap CSS --\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n\n\u003ch2\u003eLogin\u003c/h2\u003e\n{{ render_form(form) }}\n\n\u003c!-- Bootstrap JS --\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\nYou will get a form like this with only one line code (i.e. `{{ render_form(form) }}`):\n\n![form rendering](./docs/_static/form-example.png)\n\nWhen the validation fails, the error messages will be rendered with proper style:\n\n![error form rendering](./docs/_static/error-form-example.png)\n\nRead the [Basic Usage](https://bootstrap-flask.readthedocs.io/en/stable/basic) \ndocs for more details.\n\n\n## Live demo\n\nhttps://bootstrap-flask-example.azurewebsites.net/\n\n\n## Donate\n\nIf you find Bootstrap-Flask useful, please consider\n[donating today](https://opencollective.com/bootstrap-flask/donate). Your donation keeps\nBootstrap-Flask maintained and updated with Bootstrap.\n\n\n## Links\n\n- [Documentation](https://bootstrap-flask.readthedocs.io)\n- [Example Application](https://github.com/helloflask/bootstrap-flask/tree/main/examples)\n- [PyPI Releases](https://pypi.org/project/Bootstrap-Flask/)\n- [Changelog](https://github.com/helloflask/bootstrap-flask/blob/main/CHANGES.rst)\n- [Discussions](https://github.com/helloflask/bootstrap-flask/discussions)\n\n\n## Notes for Bootstrap 4 \u0026 5 support\n\nThe Bootstrap 5 support is added in Bootstrap-Flask 2.0 version. Now you can use\nthe separate extension class for different Bootstrap major versions.\n\nFor Bootstrap 4, use the `Bootstrap4` class:\n\n```python\nfrom flask_bootstrap import Bootstrap4\n\n# ...\nbootstrap = Bootstrap4(app)\n```\n\nand import macros from the template path `bootstrap4/`:\n\n```html\n{% from 'bootstrap4/form.html' import render_form %}\n```\n\nFor Bootstrap 5, use the `Bootstrap5` class:\n\n```python\nfrom flask_bootstrap import Bootstrap5\n\n# ...\nbootstrap = Bootstrap5(app)\n```\n\nand import macros from the template path `bootstrap5/`:\n\n```html\n{% from 'bootstrap5/form.html' import render_form %}\n```\n\nThe `Bootstrap` class and `bootstrap/` template path are deprecated since 2.0\nand will be removed in 3.0.\n\n\n## Migration from Flask-Bootstrap\n\nIf you come from Flask-Bootstrap, check out\n[this tutorial](https://bootstrap-flask.readthedocs.io/en/stable/migrate/) on how to\nmigrate to this extension.\n\n\n## Contributing\n\nFor guidance on setting up a development environment and how to make a\ncontribution to Bootstrap-Flask, see the\n[development documentation](https://bootstrap-flask.readthedocs.io/en/stable/#development)\nand Flask's\n[contributing guidelines](https://github.com/pallets/flask/blob/main/CONTRIBUTING.rst).\n\n\n## License\n\nThis project is licensed under the MIT License (see the `LICENSE` file for\ndetails). Some macros were part of Flask-Bootstrap and were modified under\nthe terms of its BSD License.\n","funding_links":["https://opencollective.com/bootstrap-flask","https://opencollective.com/bootstrap-flask/donate"],"categories":["SCSS"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhelloflask%2Fbootstrap-flask","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhelloflask%2Fbootstrap-flask","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhelloflask%2Fbootstrap-flask/lists"}