class Foo(models.Model):
     manager = SealableManager()
     as_manager = SealableQuerySet.as_manager()
Exemple #2
0
        class NonSealableClimate(models.Model):
            objects = SealableQuerySet.as_manager()

            class Meta:
                db_table = Climate._meta.db_table
Exemple #3
0
 def test_isinstance_manager(self):
     """Manager classes are subclasses of Manager as many third-party apps expect."""
     self.assertIsInstance(SealableManager(), models.Manager)
     self.assertIsInstance(SealableQuerySet.as_manager(), models.Manager)