I’m working on a feature. I’ve three different car types (Sedan, Hatchback, SUV): I’ve 6 features in total. Out of 6, 4 features are their in every car. The second car category has 5 and the third has all the 6 features. Here where I’m getting stuck: I’ve to send all the 6 features in all the categories to the
Tag: django-rest-framework
Is it possible to delete last n records of a django model in one/minimum database query?
I’m trying to delete last 10 records of Task table/model in django but I’m unable to do that in one query. Above code gives me error AttributeError : ‘list’ object has no attribute ‘delete’. If I make a loop and then use .delete() on each object of that list then it will call db n times which I don’t want,
How to get the most liked users on a particular date in django
So I have a social media app, where users can like the posts of other users. Now I fetch the top 20 users who have received the most number of likes. Everything is perfect. But the problem is I cant …