Ejemplo n.º 1
0
def create_default_modules():
    """This will create the 5 default groups."""
    from janitoo_manager.fixtures.modules import fixture
    result = []
    version = "0.0.6"
    for key, value in fixture.items():
        modul = Module(uuid=key)

        for k, v in value.items():
            setattr(modul, k, v)
        modul.save()
        result.append(modul)
    return result
Ejemplo n.º 2
0
def create_default_forums():
    """This will create the 5 default groups."""
    from janitoo_manager.fixtures.forums import fixture
    result = []
    for key, value in fixture.items():
        forum = Forum(title=key)

        for k, v in value.items():
            setattr(forum, k, v)

        forum.save()
        result.append(forum)
    return result
Ejemplo n.º 3
0
def create_default_modules_categories():
    """This will create the 5 default groups."""
    from janitoo_manager.fixtures.modules_categories import fixture
    result = []
    for key, value in fixture.items():
        category = ModuleCategory(id=key)

        for k, v in value.items():
            setattr(category, k, v)

        category.save()
        result.append(category)
    return result
Ejemplo n.º 4
0
def create_default_groups():
    """This will create the 5 default groups."""
    from janitoo_manager.fixtures.groups import fixture
    result = []
    for key, value in fixture.items():
        group = Group(name=key)

        for k, v in value.items():
            setattr(group, k, v)

        group.save()
        result.append(group)
    return result