From 78cac61cd5278a466b3d5b7d49c41451bee56982 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Tue, 28 Jul 2020 03:09:53 +0800 Subject: [PATCH] Renamed the templates edit.html to form.html, and show.html to view.html in the accounting application. --- .../accounting/transactions/expense/{edit.html => form.html} | 0 .../accounting/transactions/expense/{show.html => view.html} | 0 .../accounting/transactions/income/{edit.html => form.html} | 0 .../accounting/transactions/income/{show.html => view.html} | 0 .../accounting/transactions/transfer/{edit.html => form.html} | 0 .../accounting/transactions/transfer/{show.html => view.html} | 0 accounting/views.py | 4 ++-- 7 files changed, 2 insertions(+), 2 deletions(-) rename accounting/templates/accounting/transactions/expense/{edit.html => form.html} (100%) rename accounting/templates/accounting/transactions/expense/{show.html => view.html} (100%) rename accounting/templates/accounting/transactions/income/{edit.html => form.html} (100%) rename accounting/templates/accounting/transactions/income/{show.html => view.html} (100%) rename accounting/templates/accounting/transactions/transfer/{edit.html => form.html} (100%) rename accounting/templates/accounting/transactions/transfer/{show.html => view.html} (100%) diff --git a/accounting/templates/accounting/transactions/expense/edit.html b/accounting/templates/accounting/transactions/expense/form.html similarity index 100% rename from accounting/templates/accounting/transactions/expense/edit.html rename to accounting/templates/accounting/transactions/expense/form.html diff --git a/accounting/templates/accounting/transactions/expense/show.html b/accounting/templates/accounting/transactions/expense/view.html similarity index 100% rename from accounting/templates/accounting/transactions/expense/show.html rename to accounting/templates/accounting/transactions/expense/view.html diff --git a/accounting/templates/accounting/transactions/income/edit.html b/accounting/templates/accounting/transactions/income/form.html similarity index 100% rename from accounting/templates/accounting/transactions/income/edit.html rename to accounting/templates/accounting/transactions/income/form.html diff --git a/accounting/templates/accounting/transactions/income/show.html b/accounting/templates/accounting/transactions/income/view.html similarity index 100% rename from accounting/templates/accounting/transactions/income/show.html rename to accounting/templates/accounting/transactions/income/view.html diff --git a/accounting/templates/accounting/transactions/transfer/edit.html b/accounting/templates/accounting/transactions/transfer/form.html similarity index 100% rename from accounting/templates/accounting/transactions/transfer/edit.html rename to accounting/templates/accounting/transactions/transfer/form.html diff --git a/accounting/templates/accounting/transactions/transfer/show.html b/accounting/templates/accounting/transactions/transfer/view.html similarity index 100% rename from accounting/templates/accounting/transactions/transfer/show.html rename to accounting/templates/accounting/transactions/transfer/view.html diff --git a/accounting/views.py b/accounting/views.py index cb6f217..9a7394d 100644 --- a/accounting/views.py +++ b/accounting/views.py @@ -855,7 +855,7 @@ def transaction_show(request, type, transaction): Returns: HttpResponse: The response. """ - return render(request, F"accounting/transactions/{type}/show.html", { + return render(request, F"accounting/transactions/{type}/view.html", { "item": transaction, }) @@ -879,6 +879,6 @@ def transaction_create(request, type, transaction=None): transaction.records.append(Record(ord=1, is_credit=False)) if len(transaction.credit_records) == 0: transaction.records.append(Record(ord=1, is_credit=True)) - return render(request, F"accounting/transactions/{type}/edit.html", { + return render(request, F"accounting/transactions/{type}/form.html", { "item": transaction, })