1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
|
From: =?utf-8?b?SsOpcsOpbXkgTGFs?= <kapouer@melix.org>
Date: Fri, 6 Mar 2026 16:45:35 +0000
Subject: allow only bootstrap3 and 5, which are in debian
Forwarded: not-needed
===================================================================
---
crispy_forms/templatetags/crispy_forms_tags.py | 2 +-
tests/templates/custom_field_template.html | 2 +-
tests/templates/custom_form_template.html | 2 +-
tests/templates/custom_form_template_with_context.html | 2 +-
tests/test_form_helper.py | 8 ++++----
tests/test_settings.py | 2 +-
6 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/crispy_forms/templatetags/crispy_forms_tags.py b/crispy_forms/templatetags/crispy_forms_tags.py
index 2bf07eb..1dc3a03 100644
--- a/crispy_forms/templatetags/crispy_forms_tags.py
+++ b/crispy_forms/templatetags/crispy_forms_tags.py
@@ -261,7 +261,7 @@ def do_uni_form(parser, token):
if template_pack is not None:
template_pack = template_pack[1:-1]
ALLOWED_TEMPLATE_PACKS = getattr(
- settings, "CRISPY_ALLOWED_TEMPLATE_PACKS", ("uni_form", "bootstrap3", "bootstrap4")
+ settings, "CRISPY_ALLOWED_TEMPLATE_PACKS", ("uni_form", "bootstrap3", "bootstrap5")
)
if template_pack not in ALLOWED_TEMPLATE_PACKS:
raise template.TemplateSyntaxError(
diff --git a/tests/templates/custom_field_template.html b/tests/templates/custom_field_template.html
index bc6b3c1..04f0274 100644
--- a/tests/templates/custom_field_template.html
+++ b/tests/templates/custom_field_template.html
@@ -1,2 +1,2 @@
<h1>Special custom field</h1>
-{% include 'bootstrap4/field.html' %}
+{% include 'bootstrap5/field.html' %}
diff --git a/tests/templates/custom_form_template.html b/tests/templates/custom_form_template.html
index a668e15..c09b4c7 100644
--- a/tests/templates/custom_form_template.html
+++ b/tests/templates/custom_form_template.html
@@ -1,2 +1,2 @@
<h1>Special custom form</h1>
-{% include "bootstrap4/whole_uni_form.html" %}
+{% include "bootstrap5/whole_uni_form.html" %}
diff --git a/tests/templates/custom_form_template_with_context.html b/tests/templates/custom_form_template_with_context.html
index 2d3ff8c..477997a 100644
--- a/tests/templates/custom_form_template_with_context.html
+++ b/tests/templates/custom_form_template_with_context.html
@@ -1,4 +1,4 @@
<h1>Special custom form with context passthrough</h1>
Got prefix: {{ prefix }}.
-{% include "bootstrap4/whole_uni_form.html" %}
+{% include "bootstrap5/whole_uni_form.html" %}
Got suffix: {{ suffix }}.
diff --git a/tests/test_form_helper.py b/tests/test_form_helper.py
index bc80b73..43f9498 100644
--- a/tests/test_form_helper.py
+++ b/tests/test_form_helper.py
@@ -188,10 +188,10 @@ def test_without_helper():
def test_template_pack_override_compact(settings):
current_pack = settings.CRISPY_TEMPLATE_PACK
- if current_pack == "bootstrap4":
+ if current_pack == "bootstrap5":
override_pack = "bootstrap3"
else:
- override_pack = "bootstrap4"
+ override_pack = "bootstrap5"
# {% crispy form 'template_pack_name' %}
template = Template("""
@@ -209,10 +209,10 @@ def test_template_pack_override_compact(settings):
def test_template_pack_override_verbose(settings):
current_pack = settings.CRISPY_TEMPLATE_PACK
- if current_pack == "bootstrap4":
+ if current_pack == "bootstrap5":
override_pack = "bootstrap3"
else:
- override_pack = "bootstrap4"
+ override_pack = "bootstrap5"
# {% crispy form helper 'template_pack_name' %}
template = Template("""
diff --git a/tests/test_settings.py b/tests/test_settings.py
index 580990b..c38379c 100644
--- a/tests/test_settings.py
+++ b/tests/test_settings.py
@@ -10,7 +10,7 @@ INSTALLED_APPS = (
"crispy_forms",
"tests",
"crispy_bootstrap3",
- "crispy_bootstrap4",
+ "crispy_bootstrap5",
)
DATABASES = {"default": {"ENGINE": "django.db.backends.sqlite3", "NAME": ":memory:"}}
|