urls.py 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  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. )
  12. app_name = "expenses"
  13. urlpatterns = [
  14. path("categories", category_list, name="categories_list"),
  15. path("categories/create", CategoryCreateView.as_view(), name="category_create"),
  16. path("categories/detail/<int:pk>", category_detail, name="category_detail"),
  17. path(
  18. "categories/edit/<int:pk>", CategoryUpdateView.as_view(), name="category_edit"
  19. ),
  20. path(
  21. "categories/delete/<int:pk>",
  22. CategoryDeleteView.as_view(),
  23. name="category_delete",
  24. ),
  25. # path("category/", CategoryView.as_view(), name="category"),
  26. path("expenses", expenses_list, name="expense_list"),
  27. path("expenses/lone/create", lone_expense_create, name="lone_expense_create"),
  28. path(
  29. "expenses/multiple/create",
  30. multiple_expense_create,
  31. name="multiple_expense_create",
  32. ),
  33. ]