django-queryset
Django queryset with "isnull" argument returning duplicates
I want to only return items that don\'t have associated images.My relationship is something like this:[详细]
2023-03-04 05:29 分类:问答Django: Total birthdays each day for the next 30 days
I\'ve got a model similar to this: class Per开发者_JS百科son(models.Model): name = models.CharField(max_length=40)[详细]
2023-03-04 03:48 分类:问答django model cannot access parent child record
I have a very strange problem, I have a queryset that join with itself, when I try to access the p开发者_StackOverflow社区arent record information using a[n] it works, when I loop through it doesn\'t.[详细]
2023-03-03 19:12 分类:问答Get total for each month using Django
I have a model like this: class Sales(models.Model): item = models.CharField(max_length=40) date_sold = models.DateTimeField()[详细]
2023-03-03 13:34 分类:问答In Django, Can I `defer()` fields in an object that's being queried by `select_related()`
In my Django app I want to use select_related() on a QuerySet to \"follow\" a ForeignKey field, but I only need to access a few of the fields on the \"followed\" model instance. Can I use the defer()[详细]
2023-03-03 06:44 分类:问答Effeciently Lookup Multiple Model Foreign Key Sets in Django
I have two models: from django.db import Models LANGUAGES = ( (\'en\',\'English\'), (\'es\',\'Spanish\'),[详细]
2023-03-03 00:10 分类:问答Specifying Django Query Filters at Run Time
How do I specify an arbitrary Django query filter at runtime? Normally one uses filters like so... query_set = MyModel.objects.filter(name__iexact=\'foobar\')[详细]
2023-03-02 23:10 分类:问答Django QuerySet order_by string evaluation
I\'m trying to sort my QuerySet based on how the objects in the QuerySet are evaluated as Strings. So my model looks something like this:[详细]
2023-03-01 12:20 分类:问答Using Django custom manager function on an already filtered queryset
Consider the following case: class MyModelManager(models.Manager): def my_filter(self): return [some code here].filter(field_A__gt=3)[详细]
2023-03-01 11:19 分类:问答Yet another QuerySet custom ordering problem
Lots of searchi开发者_运维知识库ng, found nothing so far. In my django app, Model_X is rated by my users using a very standard ratings model.I have a standalone function that processes a LOT of data[详细]
2023-03-01 05:55 分类:问答