...

/

Delete Listing View and Template

Delete Listing View and Template

Learn how to create a view and a template for the Delete Listing page.

Lastly, we need to create a page which will show the option to remove any particular listing.

Delete Listing URL

The following code is added in urls.py to add the path to the Delete Listing page.

Press + to interact
path('delete_listing/<delete_id>/', views.delete_listing, name='delete_listing')

Delete Listing view

For the delete view, we’ll use a very similar approach to that of the edit ...