Beispiel #1
0
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(),
    )
Beispiel #2
0
def index():
    user = check_auth()
    user_hash = None
    if "PROGRAM_READY" in app.config['STAGES']:
        talks = get_talks_dict()
        extra_talks = []
    else:
        talks, extra_talks = get_talks()
        # bez razeni talks = sorted(talks, key=lambda x: x['title'])

    if user:
        user_hash = user['user_hash']

    stage_template = "index.html"
    if "END" in app.config['STAGES']:
        stage_template = "end.html"

    if "PREVIEW" in app.config['STAGES']:
        stage_template = "preview.html"

    return render_template(
        stage_template,
        user=user,
        menu=menu(),
        times=times,
        entrant_count=get_count(),
        entrants=get_entrants()[:50],
        user_votes=get_user_votes(user_hash),
        novinky=markdown_markup('novinky'),
        sponsors_main=markdown_markup('sponsors_main'),
        sponsors_medial=markdown_markup('sponsors_medial'),
        workshops=markdown_markup('workshopy-program'),
        sponsors=markdown_markup('sponsors'),
        talks=talks, extra_talks=extra_talks,
        talks_dict=get_talks_dict())
Beispiel #3
0
def entrants():
    return render_template(
        "entrants.html",
        user=check_auth(),
        menu=menu(),
        entrant_count=get_count(),
        entrants=reversed(get_entrants())
    )
Beispiel #4
0
def index():
    user = check_auth()
    user_hash = None
    talks, extra_talks = get_talks()
    if user:
        user_hash = user['user_hash']
    return render_template(
        "index.html",
        user=user,
        menu=menu(),
        times=times,
        entrant_count=get_count(),
        entrants=get_entrants()[50:0:-1],
        #user_votes=get_user_votes(user_hash),
        sponsors_main=markdown_markup('sponsors_main'),
        sponsors=markdown_markup('sponsors'),
        talks=get_talks_dict())
Beispiel #5
0
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
    )
Beispiel #6
0
def entrants():
    return render_template(
        "entrants.html",
        entrant_count=get_count(),
        entrants=reversed(get_entrants())
    )
Beispiel #7
0
def entrants():
    return render_template("entrants.html",
                           entrant_count=get_count(),
                           entrants=reversed(get_entrants()))