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