def deadline_calendar(): """ A vCal file of impending deadlines. """ events = [] for conf in db.deadlines(): # Use extended paper deadline if it exists, or the original otherwise. if conf.extendedDeadline: events.append( ( "%s Deadline (extended)" % conf.abbreviation, "Extended paper deadline for %s" % conf.name, conf.where(), conf.extendedDeadline, )) elif conf.deadline: events.append( ( "%s Deadline" % conf.abbreviation, "Paper deadline for %s" % conf.name, conf.where(), conf.deadline, )) # A conference may also have a poster deadline. if conf.posterDeadline: events.append( ( "%s Poster Deadline" % conf.abbreviation, "Poster deadline for %s" % conf.name, conf.where(), conf.posterDeadline, )) return utils.make_vcal(events, 'Conference Deadlines')
def main(): """ Main "entry point" for the site. """ # What tags are we using to filter results? tag_names = utils.tags() current_tags = [ id for (id, name) in db.get_tags(tag_names) ] if len(tag_names) == 0: tag_names = None # Render from the 'main' template. return flask.render_template('main.html', tags = tag_names, deadlines = db.deadlines(current_tags), upcoming = db.upcoming(current_tags), recent = db.recent(current_tags), utils = utils)