Top "Django-queryset" questions

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

How do I do a not equal in Django queryset filtering?

In Django model QuerySets, I see that there is a __gt and __lt for comparative values, but is there a __…

python django django-models django-queryset
Filtering for empty or NULL names in a queryset

I have first_name, last_name & alias (optional) which I need to search for. So, I need a query …

django django-models django-queryset filter null
How to combine two or more querysets in a Django view?

I am trying to build the search for a Django site I am building, and in that search, I am …

django search django-queryset django-q
How do I filter query objects by date range in Django?

I've got a field in one model like: class Sample(models.Model): date = fields.DateField(auto_now=False) Now, I …

python django django-models django-queryset
How can I filter a Django query with a list of values?

I'm sure this is a trivial operation, but I can't figure out how it's done. There's got to be something …

python django django-queryset
How do I get the object if it exists, or None if it does not exist?

When I ask the model manager to get an object, it raises DoesNotExist when there is no matching object. go = …

python django django-queryset
How can I filter a date of a DateTimeField in Django?

I am trying to filter a DateTimeField comparing with a date. I mean: MyObject.objects.filter(datetime_attr=datetime.date(2009,8,22)) …

python django datetime filter django-queryset
select and update database record with a single queryset

How do I run an update and select statements on the same queryset rather than having to do two queries: …

sql django django-models orm django-queryset
Getting the SQL from a Django QuerySet

How do I get the SQL that Django will use on the database from a QuerySet object? I'm trying to …

python sql django django-queryset
How do I do an OR filter in a Django query?

I want to be able to list the items that either a user has added (they are listed as the …

django django-queryset