urls.py 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. from django.urls import path
  2. from . import views
  3. app_name = "films"
  4. urlpatterns = [
  5. path('', views.film_list, name='home'),
  6. path('countries/', views.country_list, name='country_list'),
  7. path('countries/<int:id>/', views.country_detail, name='country_detail'),
  8. path('countries/create/', views.country_create, name='country_create'),
  9. path('countries/<int:id>/update/',
  10. views.country_update, name='country_update'),
  11. path('countries/<int:id>/delete/',
  12. views.country_delete, name='country_delete'),
  13. path('countries/autocomplete/',
  14. views.CountryAutocomplete.as_view(), name='country_autocomplete'),
  15. path('genres/', views.genre_list, name='genre_list'),
  16. path('genres/<int:id>/', views.genre_detail, name='genre_detail'),
  17. path('genres/create/', views.genre_create, name='genre_create'),
  18. path('genres/<int:id>/update/',
  19. views.genre_update, name='genre_update'),
  20. path('genres/<int:id>/delete/',
  21. views.genre_delete, name='genre_delete'),
  22. path('films/', views.film_list, name='film_list'),
  23. path('films/<int:id>/', views.film_detail, name='film_detail'),
  24. path('films/create/', views.film_create, name='film_create'),
  25. path('films/<int:id>/update/',
  26. views.film_update, name='film_update'),
  27. path('film/<int:id>/delete/',
  28. views.film_delete, name='film_delete'),
  29. path('people/', views.person_list, name='person_list'),
  30. path('people/<int:id>/', views.person_detail, name='person_detail'),
  31. path('people/create/', views.person_create, name='person_create'),
  32. path('people/<int:id>/update/',
  33. views.person_update, name='person_update'),
  34. path('people/<int:id>/delete/',
  35. views.person_delete, name='person_delete'),
  36. path('people/autocomplete/',
  37. views.PersonAutocomplete.as_view(), name='person_autocomplete'),
  38. ]