calc/views.py
def add():
    """Takes numbers params and sums them together"""
    if not request.args.getlist('numbers'):
        return "You need to give numbers to add", 400
    numbers = request.args.get('numbers')
    return str(calculator.add(numbers))
Takes numbers params and sums them together
Takes numbers params and sums them together
Takes numbers params and sums them together
def add():
    if not request.args.getlist('numbers'):
        return "You need to give numbers to add", 400
    numbers = request.args.get('numbers')
    return str(calculator.add(numbers))
def add ( ) : if not request . args . getlist ( 'numbers' ) : return "You need to give numbers to add" , 400 numbers = request . args . get ( 'numbers' ) return str ( calculator . add ( numbers ) )
Takes numbers params and sums them together
Takes numbers params and sums them together
"""Takes numbers params and sums them together"""