hw_todo/routes.py
def complete(id):
    """
    (GET)
    Updates the completed field of the given assignment to either True or False
    """
    task_to_complete = Todo.query.get_or_404(id)
    

    try:
        task_to_complete.completed = not task_to_complete.completed
        db.session.commit()
        return Response(status=204)
    except Exception as e:
        print(e)
        return 'There was a problem completing that task'

    (GET)
    Updates the completed field of the given assignment to either True or False
    
(GET)
Updates the completed field of the given assignment to either True or False
( GET ) Updates the completed field of the given assignment to either True or False
def complete(id):
    task_to_complete = Todo.query.get_or_404(id)
    try:
        task_to_complete.completed = not task_to_complete.completed
        db.session.commit()
        return Response(status=204)
    except Exception as e:
        print(e)
        return 'There was a problem completing that task'
def complete ( id ) : task_to_complete = Todo . query . get_or_404 ( id ) try : task_to_complete . completed = not task_to_complete . completed db . session . commit ( ) return Response ( status = 204 ) except Exception as e : print ( e ) return 'There was a problem completing that task'
(GET)
Updates the completed field of the given assignment to either True or False
( GET ) Updates the completed field of the given assignment to either True or False
"""
    (GET)
    Updates the completed field of the given assignment to either True or False
    """
id