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

            class Meta:
                db_table = Climate._meta.db_table
예제 #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)