From 9686196b915e0bcdefe0e20f696201d91b46187b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Sat, 8 Aug 2020 14:09:02 +0800 Subject: [PATCH] Renamed the template variables in the account list to be more meaningful in the accounting application. --- accounting/templates/accounting/account_list.html | 14 +++++++------- accounting/views.py | 1 + 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/accounting/templates/accounting/account_list.html b/accounting/templates/accounting/account_list.html index a45356c..fe647b0 100644 --- a/accounting/templates/accounting/account_list.html +++ b/accounting/templates/accounting/account_list.html @@ -45,7 +45,7 @@ First written: 2020/7/1 {% endwith %} -{% if object_list %} +{% if account_list %} @@ -55,19 +55,19 @@ First written: 2020/7/1 - {% for object in object_list %} - - + {% for account in account_list %} + +
{{ object.code }}
{{ account.code }} - {{ object.title }} - {% if object.is_parent_and_in_use %} + {{ account.title }} + {% if account.is_parent_and_in_use %} {{ _("Parent Account In Use")|force_escape }} {% endif %} - + {{ _("View")|force_escape }} diff --git a/accounting/views.py b/accounting/views.py index 43d8e15..030b050 100644 --- a/accounting/views.py +++ b/accounting/views.py @@ -1042,6 +1042,7 @@ def txn_sort(request, date): class AccountListView(ListView): """The view to list the accounts.""" queryset = Account.objects.order_by("code") + context_object_name = "account_list" @require_GET