Answer the question
In order to leave comments, you need to log in
How to delete entries in the database that are not in the list?
There is a list of required movies_dont_delete entries.
So I can only delete them
movies_dont_delete = ['111028821', '121039321', '121038721']
Movie.objects.filter(movie_pu_number__in=movies_dont_delete).delete()
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question