Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(10)  |  Call(10)  |  Derive(0)  |  Import(0)

src/d/j/django-pgfields-HEAD/tests/composite/fields.py   django-pgfields(Download)
class MonarchField(models.CompositeField):
    title = models.CharField(max_length=20)
    name = models.CharField(max_length=50)
    suffix = models.IntegerField(default=0)
 
 
class BookField(models.CompositeField):
    title = models.CharField(max_length=100)
    pages = models.IntegerField()

src/d/j/django-pgfields-HEAD/tests/managers/tests.py   django-pgfields(Download)
        class Foo1(models.Model):
            objects = select_manager()
            bar = models.IntegerField()
        self.assertIsInstance(Foo1.objects, models.Manager)
 
    @override_settings(DJANGOPG_DEFAULT_MANAGER=models.Manager)
    def test_base_manager_obj(self):
        class Foo2(models.Model):
            objects = select_manager()
            bar = models.IntegerField()
        class Foo3(models.Model):
            objects = select_manager()
            bar = models.IntegerField()
        self.assertIsInstance(Foo3.objects, models.GeoManager)
 
            class Foo4(models.Model):
                objects = select_manager()
                bar = models.IntegerField()
            self.assertIsInstance(Foo4.objects, models.GeoManager)
 
            class Foo(models.Model):
                objects = select_manager()
                bar = models.IntegerField()
 
    @override_settings(DJANGOPG_DEFAULT_MANAGER='bogus.Manager')

src/d/j/django-pgfields-HEAD/tests/improved_repr/models.py   django-pgfields(Download)
class Book(models.Model):
    title = models.CharField(max_length=50)
    year_published = models.IntegerField()
 
 
class Movie(models.Model):
    title = models.CharField(max_length=50)
    based_on = models.ForeignKey(Book, null=True)
    year_published = models.IntegerField()