How to custom for list view and add method DELETE in ListCreateAPIView #8507
Answered
by
yyyyyyyan
kev26
asked this question in
Question & Answer
-
This is my code:
I researched and found that the DELETE method in ListCreateAPIView is valid, but I don't know to use this method to delete all tutorials! And further, I want to customize the list view by filtering (title or author) instead of all tutorials! |
Beta Was this translation helpful? Give feedback.
Answered by
yyyyyyyan
Jun 4, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi! Let's start with the filtering, because you can also use that on DELETE!
If you want to add basic filtering via query parameters, you can override the
get_queryset()
to manually add this logic: