{"id":16417257,"url":"https://github.com/django-crispy-forms/crispy-bootstrap5","last_synced_at":"2025-10-26T20:30:24.533Z","repository":{"id":37863271,"uuid":"311149863","full_name":"django-crispy-forms/crispy-bootstrap5","owner":"django-crispy-forms","description":"Bootstrap5 template pack for django-crispy-forms","archived":false,"fork":false,"pushed_at":"2024-11-19T07:12:10.000Z","size":208,"stargazers_count":478,"open_issues_count":20,"forks_count":80,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-01-19T23:48:04.782Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/django-crispy-forms.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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},"funding":{"github":["django-crispy-forms"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2020-11-08T20:36:46.000Z","updated_at":"2025-01-19T14:27:57.000Z","dependencies_parsed_at":"2024-06-03T20:39:44.953Z","dependency_job_id":"374c48d1-95b4-461b-a7e3-c095dd3da268","html_url":"https://github.com/django-crispy-forms/crispy-bootstrap5","commit_stats":{"total_commits":104,"total_committers":17,"mean_commits":6.117647058823529,"dds":"0.42307692307692313","last_synced_commit":"668e66db094f7ddec12cd29cf0c7705788b5f1a8"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/django-crispy-forms%2Fcrispy-bootstrap5","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/django-crispy-forms%2Fcrispy-bootstrap5/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/django-crispy-forms%2Fcrispy-bootstrap5/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/django-crispy-forms%2Fcrispy-bootstrap5/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/django-crispy-forms","download_url":"https://codeload.github.com/django-crispy-forms/crispy-bootstrap5/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238394323,"owners_count":19464583,"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":[],"created_at":"2024-10-11T07:11:23.409Z","updated_at":"2025-10-26T20:30:19.154Z","avatar_url":"https://github.com/django-crispy-forms.png","language":"HTML","readme":"# crispy-bootstrap5\n\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/smithdc1/crispy-bootstrap5/blob/main/LICENSE)\n\nBootstrap5 template pack for django-crispy-forms\n\n## Installation\n\nInstall this plugin using `pip`:\n```bash\n$ pip install crispy-bootstrap5\n```\n\n## Usage\n\nYou will need to update your project's settings file to add ``crispy_forms``\nand ``crispy_bootstrap5`` to your projects ``INSTALLED_APPS``. Also set\n``bootstrap5`` as and allowed template pack and as the default template pack\nfor your project\n\n```python\nINSTALLED_APPS = (\n    ...\n    \"crispy_forms\",\n    \"crispy_bootstrap5\",\n    ...\n)\n\nCRISPY_ALLOWED_TEMPLATE_PACKS = \"bootstrap5\"\n\nCRISPY_TEMPLATE_PACK = \"bootstrap5\"\n```\n\n## What's new?\n\nBootstrap 5 introduces [floating labels](https://getbootstrap.com/docs/5.0/forms/floating-labels/).\nThis template pack include a layout object to use this input type\n\n```python\nfrom crispy_bootstrap5.bootstrap5 import FloatingField\n\n# then in your Layout\n... Layout(\n    FloatingField(\"first_name\"),\n)\n```\n\nAccordions also have new features, such as [Accordion flush](https://getbootstrap.com/docs/5.0/components/accordion/#flush) and [Always open](https://getbootstrap.com/docs/5.0/components/accordion/#always-open).\nThere is a new layout object to use them\n\n```python\nfrom crispy_bootstrap5.bootstrap5 import BS5Accordion\n\n# then in your Layout\n# if not informed, flush and always_open default to False\n... Layout(\n    BS5Accordion(\n        AccordionGroup(\"group name\", \"form_field_1\", \"form_field_2\"),\n        AccordionGroup(\"another group name\", \"form_field\"),\n        flush=True,\n        always_open=True\n    )\n)\n```\n\nSupport is added for [Switches](https://getbootstrap.com/docs/5.2/forms/checks-radios/#switches). Switches are a custom \ncheckbox rendered as a toggle switch. The widget for these fields should be\na [CheckboxInput](https://docs.djangoproject.com/en/4.2/ref/forms/widgets/#django.forms.CheckboxInput).\n\n```python\nfrom crispy_bootstrap5.bootstrap5 import Switch\n\n... Layout(Switch(\"is_company\"))\n```\n\n\n## Development\n\nTo contribute to this library, first checkout the code. Then create a new virtual environment:\n\n```bash\ncd crispy-bootstrap5\npython -m venv venv\nsource venv/bin/activate\n```\n\nOr if you are using `pipenv`:\n```bash\npipenv shell\n```\n\nNow install the dependencies and tests:\n```bash\npip install -e '.[test]'\n```\n\nTo run the tests:\n```bash\npytest\n```\n","funding_links":["https://github.com/sponsors/django-crispy-forms"],"categories":["HTML"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdjango-crispy-forms%2Fcrispy-bootstrap5","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdjango-crispy-forms%2Fcrispy-bootstrap5","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdjango-crispy-forms%2Fcrispy-bootstrap5/lists"}