Can we add add objects to django queryset like we do to python list. I have an empty django queryset, now I want to add objects to it

This is how I have initialized an Empty Queryset now I want to add objects to it. How can I do that.

 from django.db.models.query import EmptyQuerySet

EmptyQuerySet is a class to checking if a queryset is empty by .none()

A queryset represents a query you make to your database and it have to be translatable to an SQL query.

So you can't add objects to a QuerySet like to python list but you can combine queryset using set operations. See QuerySet API Reference for more information.

Back to Top