예제 #1
0
def add(user_id, form):
    """Add a UserAllergy"""
    user_allergy_obj = UserAllergy()

    user_allergy_obj.user_id = user_id
    user_allergy_obj.allergy_id = form['allergy_id']
    return crud.add(user_allergy_obj)
예제 #2
0
def add(recipe_obj):
    """ Add a recipe object """
    crud.add(recipe_obj)
예제 #3
0
def add(url):
    """Add a RecipeURL"""
    recipe_url_obj = RecipeURL(url=url)
    return crud.add(recipe_url_obj)
예제 #4
0
def add(ingredient_obj):
    """ Add a Ingredient Object to the database """
    crud.add(ingredient_obj)
예제 #5
0
def delete(ingredient_obj):
    """ delete a Ingredient Object to the database """
    crud.add(ingredient_obj)
예제 #6
0
def add(measurement_obj):
    """ Add a Measurement Object to the database """
    crud.add(measurement_obj)
예제 #7
0
def add(recipe_step_obj):
    """ Add a Recipe Step Object to the database """
    crud.add(recipe_step_obj)
예제 #8
0
def add(quantity_obj):
    """ Add a Quantity Object to the database """
    crud.add(quantity_obj)
예제 #9
0
def add(user_obj):
    """Add a User"""
    user_obj.set_password()
    return crud.add(user_obj)