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

All Samples(3)  |  Call(2)  |  Derive(0)  |  Import(1)

src/d/j/django-pgfields-HEAD/tests/composite/tests.py   django-pgfields(Download)
from django_pg import models
from django_pg.models.fields.composite import CompositeField
from tests.composite.fields import Monarch, Book, Item
from tests.composite.models import Monarchy, Author, Character
 
            items=[
                Item(
                    name='Glamdring the Foe-hammer',
                    acquired_in=Book(
                        title='The Hobbit',
            name='Bilbo Baggins',
            items=[
                Item(name='The One Ring', acquired_in=('The Hobbit', 600)),
            ]
        )