March 2020
Intermediate to advanced
608 pages
17h 17m
English
Execute these steps one by one to add the modal dialog as an intermediate step between the list view and the detail view:
# myproject/apps/locations/urls.pyfrom django.urls import pathfrom .views import LocationList, LocationDetailurlpatterns = [ path("", LocationList.as_view(), name="location_list"), path("add/", add_or_change_location, name="add_location"), path("<uuid:pk>/", LocationDetail.as_view(), name="location_detail"), path( "<uuid:pk>/modal/", LocationDetail.as_view(template_name= "locations/location_detail_modal.html"), name="location_detail_modal", ),]
{# locations/location_detail_modal.html ...