Exemplo n.º 1
0
def create_template_collection(database, templates=None):
    """Creates an template collection in mongo, adding
    the passed 1D array of templates to the new collection.
    Returns the newly created templates.
    """
    template_dao.remove_template_collection(database)
    created_templates = template_dao.create_template_collection(database, templates)
    return created_templates
Exemplo n.º 2
0
def create_template_collection(database, templates=None):
    """Creates an template collection in mongo, adding
    the passed 1D array of templates to the new collection.
    Returns the newly created templates.
    """
    template_dao.remove_template_collection(database)
    created_templates = template_dao.create_template_collection(
        database, templates)
    return created_templates
Exemplo n.º 3
0
def remove_template_collection(database):
    """Completely removes a template collection from the database.
    """
    return template_dao.remove_template_collection(database)
Exemplo n.º 4
0
def remove_template_collection(database):
    """Completely removes a template collection from the database.
    """
    return template_dao.remove_template_collection(database)