Manager
class¶
saffier.Manager
¶
Manager(model_class=None)
Base Manager for the Saffier Models. To create a custom manager, the best approach is to inherit from the ModelManager.
Example
from saffier.managers import ModelManager from saffier.core.db.models import Model
class MyCustomManager(ModelManager): ...
class MyOtherManager(ModelManager): ...
class MyModel(saffier.Model): query = MyCustomManager() active = MyOtherManager()
...
PARAMETER | DESCRIPTION |
---|---|
model_class |
TYPE:
|
Source code in saffier/core/db/models/managers.py
32 33 |
|
__get__
¶
__get__(_, owner)
PARAMETER | DESCRIPTION |
---|---|
_ |
TYPE:
|
owner |
TYPE:
|
Source code in saffier/core/db/models/managers.py
35 36 |
|
get_queryset
¶
get_queryset()
Returns the queryset object.
Checks for a global possible tenant and returns the corresponding queryset.
Source code in saffier/core/db/models/managers.py
38 39 40 41 42 43 44 45 46 47 48 |
|