def index(): talks, extra_talks = get_talks() workshops = get_workshops() tiles = Tiles(app.redis, app.config['YEAR']) sponsors = Sponsors(app.redis, app.config['YEAR']) stage_template = "index.html" if stage_is_active(app.config['YEAR'], 'END'): stage_template = "end.html" if stage_is_active(app.config['YEAR'], 'PREVIEW'): stage_template = "preview.html" return render_template( stage_template, times=times, entrant_count=get_count(), entrants=get_entrants()[:50], novinky=markdown_markup('novinky'), talks=talks, extra_talks=extra_talks, talks_dict=get_talks_dict(), workshops=workshops, hi_tiles=filter(lambda x: x['score'] > 10, tiles.get_all()), low_tiles=filter(lambda x: x['score'] <= 10, tiles.get_all()), sponsors=sponsors.get_all_by_type(), )
def workshops_all(): if stage_is_active(app.config['YEAR'], 'PROGRAM'): workshops = get_workshops_dict() else: workshops = get_workshops() return render_template( "workshops.html", times=times, workshops=workshops, )
def workshops_all(): if stage_is_active(app.config['YEAR'], 'WORKSHOPS-PROGRAM'): workshops = get_workshops_dict() else: workshops = get_workshops() return render_template( "workshops.html", times=times, workshops=workshops, )
def index(): talks, extra_talks = get_talks() workshops = get_workshops() stage_template = "index.html" if stage_is_active(app.config['YEAR'], 'END'): stage_template = "end.html" if stage_is_active(app.config['YEAR'], 'PREVIEW'): stage_template = "preview.html" return render_template( stage_template, times=times, entrant_count=get_count(), entrants=get_entrants()[:50], novinky=markdown_markup('novinky'), talks=talks, extra_talks=extra_talks, talks_dict=get_talks_dict(), workshops=workshops )
def talks_all(): user = check_auth() user_hash = None if stage_is_active(app.config['YEAR'], 'PROGRAM'): talks = get_talks_dict() else: talks = get_talks_by_type() if user: user_hash = user['user_hash'] return render_template("talks.html", talks=talks, times=times, user_votes=get_user_votes(user_hash))
def talks_all(): user = check_auth() user_hash = None if stage_is_active(app.config['YEAR'], 'PROGRAM'): talks = get_talks_dict() extra_talks = [] else: talks, extra_talks = get_talks() if user: user_hash = user['user_hash'] return render_template( "talks.html", talks=talks, times=times, user_votes=get_user_votes(user_hash), extra_talks=extra_talks )