# DELETE\_to\_DESTROY

**URL:** <https://forum.codewithmosh.com/t/delete-to-destroy/10163>\
**Category:** Django\
**Created:** [January 23, 2022, 3:28pm UTC](https://forum.codewithmosh.com/t/delete-to-destroy/10163 "2022-01-23T15:28:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sanjar](https://avatars.discourse-cdn.com/v4/letter/s/e9c0ed/32.png) [@Sanjar](https://forum.codewithmosh.com/u/Sanjar)\
**Post date:** [January 23, 2022, 3:28pm UTC](https://forum.codewithmosh.com/t/delete-to-destroy/10163/1 "2022-01-23T15:28:38Z")

</div>

![DELETE_DESTROY](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/2X/f/fec0861f078a8bd90719a3c478eda78474839d72.png)

Hi everyone, as Mosh mentioned in the video 7-Routers (Advanced API Concepts, The Ultimate Django Series: Part 2)

the delete method in class ProductViewSet(ModelViewSet) was wrong and he corrected it.

Delete method in class CollectionViewSet(ModelViewSet) he leaved us as exercise.

I tried to correct it but I dont know is it true or not.

Assist plz.

---

<div class="post-metadata">

**Author:** ![jendives](https://avatars.discourse-cdn.com/v4/letter/j/9dc877/32.png) [@jendives](https://forum.codewithmosh.com/u/jendives)\
**Post date:** [April 9, 2024, 1:09pm UTC](https://forum.codewithmosh.com/t/delete-to-destroy/10163/2 "2024-04-09T13:09:57Z")

</div>

This is late but for new learners this may help.  
Sanjar code is correct.
