urls.py 702 B

12345678910111213141516171819202122232425
  1. # Copyright © 2023 Ingram Micro Inc. All rights reserved.
  2. from django.urls import path
  3. from app.views import (
  4. main_view,
  5. product_create_view,
  6. product_delete_view,
  7. purchase_create_view,
  8. purchase_delete_view,
  9. user_create_view,
  10. user_delete_view,
  11. user_update_view,
  12. )
  13. urlpatterns = [
  14. path('', main_view),
  15. path('users/', user_create_view),
  16. path('users/<int:pk>/update/', user_update_view),
  17. path('users/<int:pk>/delete/', user_delete_view),
  18. path('products/', product_create_view),
  19. path('products/<int:pk>/delete/', product_delete_view),
  20. path('purchases/', purchase_create_view),
  21. path('purchases/<int:pk>/delete/', purchase_delete_view),
  22. ]