From 772670ebf95490e7dd6e9ec0087fae2b4f5aa34d Mon Sep 17 00:00:00 2001 From: "Denis V. Dedkov" Date: Sat, 8 Aug 2015 17:33:01 +0500 Subject: [PATCH] =?UTF-8?q?=D0=A4=D0=BE=D1=80=D0=BC=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Сделал объединение ячеек Сделал выравнивание по правой стороне Переименовал кнопки --- asuzr/forms.py | 4 +++- templates/asuzr/base.html | 3 +++ templates/asuzr/table_with_form.html | 20 ++++++++++---------- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/asuzr/forms.py b/asuzr/forms.py index 3947c56..b4cfd94 100644 --- a/asuzr/forms.py +++ b/asuzr/forms.py @@ -47,7 +47,8 @@ class OrderForm(ModelForm): class Meta: model = Order fields = ['product', 'price', 'paid', 'address', 'designer', 'deadline', 'delivery', 'lifting'] - + + submit_text = "Добавить заказ" product = forms.ModelChoiceField( required=False, queryset = Product.objects.all(), @@ -60,6 +61,7 @@ class ProdTableForm(ModelForm): model = OrderCosts fields = ['cost_item', 'value'] + submit_text = "Добавить" cost_item = forms.ModelChoiceField( required=False, queryset = CostItem.objects.all(), diff --git a/templates/asuzr/base.html b/templates/asuzr/base.html index 2b6db80..9f30bb0 100644 --- a/templates/asuzr/base.html +++ b/templates/asuzr/base.html @@ -57,6 +57,9 @@ margin-left: 12px; margin-top: 6px; } + table.paleblue td.align-right { + text-align: right; + } body { background: #F5F5F5 } diff --git a/templates/asuzr/table_with_form.html b/templates/asuzr/table_with_form.html index 0aed476..96c3656 100644 --- a/templates/asuzr/table_with_form.html +++ b/templates/asuzr/table_with_form.html @@ -20,21 +20,21 @@ {% endif %} {% endfor %} {% if add_form %} - {% if params %} -
- {% else %} - - {% endif %} + {% if params %} + + {% else %} + + {% endif %} {% csrf_token %} - {% for field in add_form %} - {{field}} - {% endfor %} + {% for field in add_form %} + {{field}} + {% endfor %} - +
{% endif %} -{% endblock table.tbody %} \ No newline at end of file +{% endblock table.tbody %}