Changes between Initial Version and Version 2 of Ticket #26393


Ignore:
Timestamp:
Mar 23, 2016, 11:53:38 AM (9 years ago)
Author:
Tim Graham
Comment:

I think you have a misunderstanding of how use_for_related_fields works. The queryset in the custom manager isn't used in a query like Article.objects.filter(...) is it? If I'm missing something obvious and you have a patch demonstrating how your proposal works, then please reopen the ticket with details.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #26393

    • Property Cc rpkilby@… added
    • Property Resolutionwontfix
    • Property Status newclosed
    • Property Summary Unable to filter annotations across relationships.Unable to filter against annotations in Manager with use_for_related_fields
  • Ticket #26393 – Description

    initial v2  
    1919
    2020class Person(models.Model):
    21     first_name = SubCharField(max_length=100)
    22     last_name = SubSubCharField(max_length=100)
     21    first_name = models.CharField(max_length=100)
     22    last_name = models.CharField(max_length=100)
    2323
    24     objects = UserManager()
     24    objects = PersonManager()
    2525
    2626
    2727class Article(models.Model):
    2828    published = models.DateTimeField()
    29     author = models.ForeignKey(User, null=True, on_delete=models.CASCADE)
     29    author = models.ForeignKey(Person, null=True, on_delete=models.CASCADE)
    3030
    3131}}}
Back to Top