urls.py 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. from django.urls import path
  2. from expenses.views import (
  3. category_list,
  4. category_detail,
  5. CategoryCreateView,
  6. CategoryUpdateView,
  7. CategoryDeleteView,
  8. expenses_list,
  9. lone_expense_create,
  10. multiple_expense_create,
  11. expense_detail,
  12. create_expense,
  13. )
  14. app_name = "expenses"
  15. urlpatterns = [
  16. path("categories", category_list, name="categories_list"),
  17. path("categories/create", CategoryCreateView.as_view(), name="category_create"),
  18. path("categories/detail/<int:pk>", category_detail, name="category_detail"),
  19. path(
  20. "categories/edit/<int:pk>", CategoryUpdateView.as_view(), name="category_edit"
  21. ),
  22. path(
  23. "categories/delete/<int:pk>",
  24. CategoryDeleteView.as_view(),
  25. name="category_delete",
  26. ),
  27. # path("category/", CategoryView.as_view(), name="category"),
  28. path("expenses", expenses_list, name="expense_list"),
  29. path("expenses/lone/create", lone_expense_create, name="lone_expense_create"),
  30. path(
  31. "expenses/multiple/create",
  32. multiple_expense_create,
  33. name="multiple_expense_create",
  34. ),
  35. path("expenses/create", create_expense, name="expense_create"),
  36. path("expenses/detail/<int:pk>", expense_detail, name="expense_detail"),
  37. ]