According to my understanding, I think you want to delete without refreshing the page. If so, you need to use ajax. Use ajax to pass the id to the relevant processing view, and then get the passed id in the view. Delete, code:
If you don’t want to jump, you can consider using AJAX to access the URL of the deletion action. After the deletion is completed, refresh the current page.
The jump method you use, generally after deletion, you have to jump back to the current page in order to display the latest results
According to my understanding, I think you want to delete without refreshing the page. If so, you need to use ajax. Use ajax to pass the id to the relevant processing view, and then get the passed id in the view. Delete, code:
View in flask:
This way you can delete the specified user without refreshing the page
If you don’t want to jump, you can consider using AJAX to access the URL of the deletion action. After the deletion is completed, refresh the current page.
The jump method you use, generally after deletion, you have to jump back to the current page in order to display the latest results