nummi/nummi/main/urls.py
2022-12-31 17:28:15 +01:00

83 lines
2.9 KiB
Python

from django.urls import path
from . import views
urlpatterns = [
path("", views.IndexView.as_view(), name="index"),
path("media/user/<username>/<path:path>", views.MediaView.as_view(), name="media"),
path("login", views.LoginView.as_view(), name="login"),
path("logout", views.LogoutView.as_view(), name="logout"),
path("transactions", views.TransactionListView.as_view(), name="transactions"),
path("snapshots", views.SnapshotListView.as_view(), name="snapshots"),
path("account", views.AccountCreateView.as_view(), name="account"),
path("transaction", views.TransactionCreateView.as_view(), name="transaction"),
path(
"transaction/<transaction_pk>/invoice",
views.InvoiceCreateView.as_view(),
name="invoice",
),
path("category", views.CategoryCreateView.as_view(), name="category"),
path("snapshot", views.SnapshotCreateView.as_view(), name="snapshot"),
path("account/<pk>", views.AccountUpdateView.as_view(), name="account"),
path(
"account/<pk>/transactions",
views.AccountTListView.as_view(),
name="account_transactions",
),
path(
"account/<pk>/snapshots",
views.AccountSListView.as_view(),
name="account_snapshots",
),
path(
"account/<account>/snapshot",
views.SnapshotCreateView.as_view(),
name="snapshot",
),
path("transaction/<pk>", views.TransactionUpdateView.as_view(), name="transaction"),
path(
"transaction/<transaction_pk>/invoice/<pk>",
views.InvoiceUpdateView.as_view(),
name="invoice",
),
path("category/<pk>", views.CategoryUpdateView.as_view(), name="category"),
path(
"category/<pk>/transactions",
views.CategoryTListView.as_view(),
name="category_transactions",
),
path("snapshot/<pk>", views.SnapshotUpdateView.as_view(), name="snapshot"),
path(
"snapshot/<pk>/transactions",
views.SnapshotTListView.as_view(),
name="snapshot_transactions",
),
path(
"snapshot/<snapshot>/transaction",
views.TransactionCreateView.as_view(),
name="transaction",
),
path(
"account/<pk>/delete",
views.AccountDeleteView.as_view(),
name="del_account",
),
path(
"transaction/<pk>/delete",
views.TransactionDeleteView.as_view(),
name="del_transaction",
),
path(
"transaction/<transaction_pk>/invoice/<pk>/delete",
views.InvoiceDeleteView.as_view(),
name="del_invoice",
),
path(
"category/<pk>/delete", views.CategoryDeleteView.as_view(), name="del_category"
),
path(
"snapshot/<pk>/delete", views.SnapshotDeleteView.as_view(), name="del_snapshot"
),
path("search", views.SearchView.as_view(), name="search"),
path("search/<search>", views.SearchView.as_view(), name="search"),
]