From 9ac1dc07026fa99cebd94b449f63dfc0cc1c661f Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Mon, 25 Apr 2022 17:17:58 +0200 Subject: [PATCH] Increase products density --- src/common/templates/common/base.html | 2 +- src/purchase/forms.py | 5 ++++- src/purchase/templates/purchase/basket_item.html | 6 +++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/common/templates/common/base.html b/src/common/templates/common/base.html index 624d66d..17f4576 100644 --- a/src/common/templates/common/base.html +++ b/src/common/templates/common/base.html @@ -11,7 +11,7 @@ {% endblock %} -
+
{% include "common/navbar.html" %} {% include "common/messages.html" %} {% block content %} diff --git a/src/purchase/forms.py b/src/purchase/forms.py index 4757d08..5615783 100644 --- a/src/purchase/forms.py +++ b/src/purchase/forms.py @@ -40,7 +40,10 @@ class BasketForm(forms.ModelForm): ) fields.append(BasketItemField(field_name, product=product)) self.helper.layout = Layout( - Div(*fields, css_class="row"), + Div( + *fields, + css_class="row row-cols-2 row-cols-sm-3 row-cols-md-4 row-cols-lg-5 row-cols-xl-6 g-4", + ), Field("payment_method"), ) diff --git a/src/purchase/templates/purchase/basket_item.html b/src/purchase/templates/purchase/basket_item.html index 182d5e5..15c2c00 100644 --- a/src/purchase/templates/purchase/basket_item.html +++ b/src/purchase/templates/purchase/basket_item.html @@ -1,9 +1,9 @@ {% load crispy_forms_field %} -
-
+
+
{{ product.name }}
{% if product.image %} - + {% endif %}