hw_todo/routes.py
def update(id):
    """
    (POST)
    Updates any field of the given assignment
    """
    task = Todo.query.get_or_404(id)
    task.assignment = request.form['assignment']
    task.due_date = datetime.strptime(request.form['due_date'], '%Y-%m-%dT%H:%M')
    task.course = request.form['course']

    try:
        db.session.commit()
        return redirect('/')
    except Exception as e:
        print(e)
        return 'There was an issue updating your task'

    (POST)
    Updates any field of the given assignment
    
(POST)
Updates any field of the given assignment
( POST ) Updates any field of the given assignment
def update(id):
    task = Todo.query.get_or_404(id)
    task.assignment = request.form['assignment']
    task.due_date = datetime.strptime(request.form['due_date'], '%Y-%m-%dT%H:%M')
    task.course = request.form['course']
    try:
        db.session.commit()
        return redirect('/')
    except Exception as e:
        print(e)
        return 'There was an issue updating your task'
def update ( id ) : task = Todo . query . get_or_404 ( id ) task . assignment = request . form [ 'assignment' ] task . due_date = datetime . strptime ( request . form [ 'due_date' ] , '%Y-%m-%dT%H:%M' ) task . course = request . form [ 'course' ] try : db . session . commit ( ) return redirect ( '/' ) except Exception as e : print ( e ) return 'There was an issue updating your task'
(POST)
Updates any field of the given assignment
( POST ) Updates any field of the given assignment
"""
    (POST)
    Updates any field of the given assignment
    """
id