def edit_assignment(assignment_id): """Provides an interface for editing an assignment's start/end dates.""" # Load current details. assignment = office_utils.get_assignment(assignment_id) if assignment is None: flask.flash("Invalid request.") return flask.redirect(flask.url_for('admin.manage_positions')) return flask.render_template('edit_assignment.html', assignment=assignment)
def delete_assignment(assignment_id): """Confirms request to delete an assignment.""" # Load assignment details. assignment = office_utils.get_assignment(assignment_id) if assignment is None: flask.flash("Invalid request.") return flask.redirect(flask.url_for('admin.manage_positions')) return flask.render_template('delete_assignment.html', assignment=assignment)