Using model_cls.add_to_class() calls Manager.contribute_to_class(), which then sets the attribute to an instance of ManagerDescriptor. In the case of _default_manager, this behavior differs from Django's, as _default_manager is set to the manager instance itself, not its descriptor. This is why it is normally possible to access default_manager from a model instance. fixes #96 |
||
|---|---|---|
| .. | ||
| locale | ||
| templates/admin/polymorphic | ||
| templatetags | ||
| __init__.py | ||
| __version__.py | ||
| admin.py | ||
| base.py | ||
| manager.py | ||
| models.py | ||
| polymorphic_model.py | ||
| query.py | ||
| query_translate.py | ||
| showfields.py | ||
| tests.py | ||
| tools_for_tests.py | ||