Top "Django-queryset" questions

Django querysets are the primary abstraction for retrieving objects from Django's ORM system

django - query filter on manytomany is empty

In Django is there a way to filter on a manytomany field being empty or null. class TestModel(models.Model): …

django django-queryset
Django Query Related Field Count

I've got an app where users create pages. I want to run a simple DB query that returns how many …

django django-queryset django-select-related
Django : Filter query based on custom function

I've got a function built into my Django model class and I want to use that function to filter my …

python django django-queryset
Django - Unique list from QuerySet

I have a filtered QuerySet which has a ManyToMany field 'Client'. I want to create a unique dict of all …

django django-queryset
How to get primary keys of objects created using django bulk_create

Is there a way to get the primary keys of the items you have created using the bulk_create feature …

django django-models django-views django-queryset
When to use or not use iterator() in the django ORM

This is from the django docs on the queryset iterator() method: A QuerySet typically caches its results internally so that …

python django orm iterator django-queryset
select_related with reverse foreign keys

I have two Models in Django. The first has the hierarchy of what job functions (positions) report to which other …

django django-models django-queryset django-1.5 django-managers
_set in Django for a queryset

I'm a bit confused how to use _set in a QuerySet in Django. For example, an object Blog b, and …

django django-queryset
Django excluding one queryset from another

I have the following two models: class DeliveryTime(models.Model): delivery_time = models.CharField(max_length=15) class BlockedDeliveryTime(models.Model): …

django django-queryset
'dict' object has no attribute '_meta' on Django Serializer

def display_home(request): from datetime import * now=datetime.today() print 'Month is %s'%now.month events=Event.objects.filter(…

json django django-queryset django-serializer