44 lines
1.2 KiB
Python
44 lines
1.2 KiB
Python
from django.urls import path
|
|
|
|
from . import views
|
|
|
|
urlpatterns = [
|
|
path("list", views.TransactionListView.as_view(), name="transactions"),
|
|
path(
|
|
"history/<int:year>",
|
|
views.TransactionYearView.as_view(),
|
|
name="transaction_year",
|
|
),
|
|
path(
|
|
"history/<int:year>/<int:month>",
|
|
views.TransactionMonthView.as_view(),
|
|
name="transaction_month",
|
|
),
|
|
path("new", views.TransactionCreateView.as_view(), name="new_transaction"),
|
|
path("<transaction>", views.TransactionDetailView.as_view(), name="transaction"),
|
|
path(
|
|
"<transaction>/edit",
|
|
views.TransactionUpdateView.as_view(),
|
|
name="edit_transaction",
|
|
),
|
|
path(
|
|
"<transaction>/delete",
|
|
views.TransactionDeleteView.as_view(),
|
|
name="del_transaction",
|
|
),
|
|
path(
|
|
"<transaction>/invoice/new",
|
|
views.InvoiceCreateView.as_view(),
|
|
name="new_invoice",
|
|
),
|
|
path(
|
|
"<transaction>/invoice/<invoice>",
|
|
views.InvoiceUpdateView.as_view(),
|
|
name="invoice",
|
|
),
|
|
path(
|
|
"<transaction>/invoice/<invoice>/delete",
|
|
views.InvoiceDeleteView.as_view(),
|
|
name="del_invoice",
|
|
),
|
|
]
|