<button>No</button> <button type="submit">Yes</button> w

Here the working of both the button is the same, which means if I am pressing “No” in the browser the button is doing the same as the “Yes” button.

Is there any other way that if I will press “No” then the item will not delete.

According to Django documentation there is no option of yes or no available in the confirmation page . In Django documentation only one option is available in the confirmation page , that is of “confirm” which will send a POST request to delete the record.
So if you are using generic views then , it wouldn’t matter if you select yes or no , it will send a POST request to delete the record .

Hii,

Thank you for your response. I agree with you, but is there any way for the execution of the disagree button, which means if anyone will press “No” then the item will not delete.

Using generic views you can’t do that , for that you will have to write the code from scratch to delete data.

kindly help me to get the data…

Which data ?
The data which got deleted or the scratch code to delete the data ?

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.