Normally I'd access the queryset via SomeModel.objects()
.
I notice that inside the model, the objects
is defined to be some Manager, like, objects=SomeManager()
.
So, if I'm defining a method inside a Manager, how would I access objects
?
As in...
class SomeManager(models.Manager):
def some_method(self):
( HOW WOULD I ACCESS OBJECTS HERE? )
class SomeModel(models.Model):
... blah blah
objects=SomeManager()
If I wanted to filter something, I suppose I could do SomeModel.objects.filter
inside the manager, but somehow that feels weird. Would it be something like self.filter
or something?