From 375f0db9e02825ce4006d5f7ecccb3296d34fcad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Sun, 9 Aug 2020 14:20:59 +0800 Subject: [PATCH] Revised the names of the API views in the accounting application. --- accounting/templates/accounting/account_form.html | 2 +- .../templates/accounting/transaction_form-expense.html | 2 +- .../templates/accounting/transaction_form-income.html | 2 +- .../templates/accounting/transaction_form-transfer.html | 2 +- accounting/urls.py | 8 ++++---- accounting/views.py | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/accounting/templates/accounting/account_form.html b/accounting/templates/accounting/account_form.html index 9cdbda3..0d1d925 100644 --- a/accounting/templates/accounting/account_form.html +++ b/accounting/templates/accounting/account_form.html @@ -41,7 +41,7 @@ First written: 2020/8/8
{% csrf_token %} - +
diff --git a/accounting/templates/accounting/transaction_form-expense.html b/accounting/templates/accounting/transaction_form-expense.html index 6ecfe9c..2c7afe4 100644 --- a/accounting/templates/accounting/transaction_form-expense.html +++ b/accounting/templates/accounting/transaction_form-expense.html @@ -52,7 +52,7 @@ First written: 2020/7/23
- + diff --git a/accounting/templates/accounting/transaction_form-income.html b/accounting/templates/accounting/transaction_form-income.html index 3475281..ff43dab 100644 --- a/accounting/templates/accounting/transaction_form-income.html +++ b/accounting/templates/accounting/transaction_form-income.html @@ -52,7 +52,7 @@ First written: 2020/7/23 - + diff --git a/accounting/templates/accounting/transaction_form-transfer.html b/accounting/templates/accounting/transaction_form-transfer.html index 85562b9..b65acfb 100644 --- a/accounting/templates/accounting/transaction_form-transfer.html +++ b/accounting/templates/accounting/transaction_form-transfer.html @@ -52,7 +52,7 @@ First written: 2020/7/23 - + diff --git a/accounting/urls.py b/accounting/urls.py index 862b19b..59d6b04 100644 --- a/accounting/urls.py +++ b/accounting/urls.py @@ -97,10 +97,10 @@ urlpatterns = [ # TODO: To be done path("accounts/store", mia_core_views.todo, name="accounts.store"), - path("api/accounts/all", - views.api_account_all, name="api.accounts.all"), - path("accounts/options", - views.account_options, name="accounts.options"), + path("api/accounts", + views.api_account_list, name="api.accounts"), + path("api/accounts/options", + views.api_account_options, name="api.accounts.options"), path("accounts/", views.AccountView.as_view(), name="accounts.detail"), path("accounts//edit", diff --git a/accounting/views.py b/accounting/views.py index 519c87f..62203d1 100644 --- a/accounting/views.py +++ b/accounting/views.py @@ -1060,7 +1060,7 @@ def account_form(request, account=None): @require_GET @login_required -def api_account_all(request): +def api_account_list(request): """The API view to return all the accounts. Args: @@ -1074,7 +1074,7 @@ def api_account_all(request): @require_GET @login_required -def account_options(request): +def api_account_options(request): """The view to return the account options. Args: