예제 #1
0
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)
예제 #2
0
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)
예제 #3
0
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)
예제 #4
0
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)