Are you planning to support Django's Manager/QuerySet interaction?
Example:
from django.db import models
class NotificationQuerySet(models.QuerySet["Notification"]):
def resolved(self):
return self.filter(resolved_at__isnull=False)
class Notification(models.Model):
resolved_at = models.DateTimeField(null=True, blank=True)
objects = NotificationQuerySet.as_manager()
Notification.objects.resolved()
# => Object of class `Manager` has no attribute `resolved`
Notification.objects.all().resolved()
# .all() resolves to QuerySet[Notification, Notification]
# => Object of class `QuerySet` has no attribute `resolved`
I would expect both of these to work. Similarly for related managers, e.g. user.notification_set.resolved().
Apologies if there's already an issue about this, I've looked and couldn't find one.
Are you planning to support Django's Manager/QuerySet interaction?
Example:
I would expect both of these to work. Similarly for related managers, e.g.
user.notification_set.resolved().Apologies if there's already an issue about this, I've looked and couldn't find one.