# HTTP\_405\_METHOD\_NOT\_ALLOWED and 'error': 'Product cannot be deleted because it is associated with an order item.' -- Deleting Objects (Not Showing)

**URL:** https://forum.codewithmosh.com/t/http-405-method-not-allowed-and-error-product-cannot-be-deleted-because-it-is-associated-with-an-order-item-deleting-objects-not-showing/31015
**Category:** Django
**Created:** [January 2, 2025, 11:50am UTC](https://forum.codewithmosh.com/t/http-405-method-not-allowed-and-error-product-cannot-be-deleted-because-it-is-associated-with-an-order-item-deleting-objects-not-showing/31015 "2025-01-02T11:50:36Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![ratandas](https://avatars.discourse-cdn.com/v4/letter/r/cdc98d/32.png) [@ratandas](https://forum.codewithmosh.com/u/ratandas)
#### Post date: [January 2, 2025, 11:50am UTC](https://forum.codewithmosh.com/t/http-405-method-not-allowed-and-error-product-cannot-be-deleted-because-it-is-associated-with-an-order-item-deleting-objects-not-showing/31015/1 "2025-01-02T11:50:36Z")

</div>

**The Ultimate Django Series: Part 2:**

**Building RESTful APIs with Django REST Framework: (16 - Deleting Objects)**

video (HTTP\_405\_METHOD\_NOT\_ALLOWED and ‘error’: ‘Product cannot be deleted because it is associated with an order item.’)  
showing.

 ![Screenshot_3](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/2X/f/fbe2a7d22ad3d77f4d7d48c461ae883771e9c3fb.jpeg)

When I practice. But not showing 😪 (HTTP\_405\_METHOD\_NOT\_ALLOWED and ‘error’: ‘Product cannot be deleted because it is associated with an order item.’).  
How can I fix the problem? Please help me

 ![Screenshot_2](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/2X/2/25d1c04a6e07463a2cab85d1d0caee6aa067d6c0.png)

Here are the codes:

 ![code](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/2X/1/13c84c3608256557b1e4c5e270c0173ce2424229.png)
