def event_rsvps(): event = events.get(request.args.get('ID')) pennkeys = events.get_rsvps(request.args.get('ID')) attendees = [] if pennkeys is not None and len(pennkeys) > 0: attendees = [ users.get(pk) for pk in pennkeys ] return render_template('admin/event_rsvps.html', event=event, attendees=attendees)
def branch_page(branch): if branch not in branches.NAMES: abort(404) announcements = branches.get(branch) br_events = events.get(branch=branch) head = users.get_head(branch) return render_template('blog/branch_page.html', \ announcements=announcements, \ events=br_events, \ branch=branches.NAMES[branch], head=head)
def edit_event(): if request.method == 'GET': ID = request.args.get('ID') event = events.get(ID) utils.reverse_format_time(event, 'start') utils.reverse_format_time(event, 'end') return render_template('forms/add_event.html', event=event) form = request.form.copy() utils.prune(form) utils.format_time(form, 'start') utils.format_time(form, 'end') events.update(form['ID'], form) return redirect(url_for('admin'))