Exemplo n.º 1
0
def populate(default_data=False, sample_data=False):
    "Populate database with default data"
    from fixtures import dbfixture
    if default_data:
        from fixtures.default_data import all
        default_data = dbfixture.data(*all)
        default_data.setup()
    if sample_data:
        from fixtures.sample_data import all
        sample_data = dbfixture.data(*all)
        sample_data.setup()
Exemplo n.º 2
0
def populate(default_data=False, sample_data=False):
    "Populate database with default data"
    from fixtures import dbfixture

    if default_data:
        from fixtures.default_data import all
        default_data = dbfixture.data(*all)
        default_data.setup()

    if sample_data:
        from fixtures.sample_data import all
        sample_data = dbfixture.data(*all)
        sample_data.setup()
Exemplo n.º 3
0
def populate(default_data=True, sample_data=False):
    """Populate database with default data"""
    from fixtures import dbfixture

    if default_data:
        from fixtures import UserData
        default_data = dbfixture.data(UserData)
        default_data.setup()
Exemplo n.º 4
0
def populate(default_data=True, sample_data=False):
    "Populate database with default data"
    from fixtures import dbfixture

    if default_data:
        from fixtures import ChatroomData
        default_data = dbfixture.data(ChatroomData)
        default_data.setup()