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
Exemple #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
Exemple #3
0
def remove_template_collection(database):
    """Completely removes a template collection from the database.
    """
    return template_dao.remove_template_collection(database)
def remove_template_collection(database):
    """Completely removes a template collection from the database.
    """
    return template_dao.remove_template_collection(database)