Example #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(),
    )
Example #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())
Example #3
0
def talks_all():
    talks, extra_talks = get_talks()
    return render_template(
        "talks.html",
        user=check_auth(),
        menu=menu(),
        talks=talks,
        extra_talks=extra_talks
    )
Example #4
0
def mexico_tequilla():
    user = check_auth()
    if user['email'] != u'*****@*****.**':
        abort(418)

    talks = get_talks()
    for talk in talks:
        user_user_go(talk['user'])

    flash(u'Prezentující přidáni jako účastníci')
    return redirect(url_for('index'))
Example #5
0
def service_bad_luck():
    talks, extra_talks = get_talks()
    talks = talks[42:]
    output = io.BytesIO()
    
    for i, talk in enumerate(talks):
        user = talk['user']
        #output.write(("'%s': '%s', # %sx %s / %s \r\n" % (rooms[i//7], talk['talk_hash'], talk['score'], user['name'], talk['title'])).encode('utf-8'))
        output.write(("%s <%s>: %s\r\n" % (user['name'], user['email'], talk['title'])).encode('utf-8'))
      

    return Response(output.getvalue(), mimetype="text/plain")
Example #6
0
def service_do_programu():
    talks, extra_talks = get_talks()
    talks = talks[:42]
    output = io.BytesIO()
    
    rooms =  'd105', 'e112', 'd0206', 'd0207', 'e104', 'e105'
    for i, talk in enumerate(talks):
        user = talk['user']
        #output.write(("'%s': '%s', # %sx %s / %s \r\n" % (rooms[i//7], talk['talk_hash'], talk['score'], user['name'], talk['title'])).encode('utf-8'))
        output.write(("%s: <%s>\r\n" % (rooms[i//7], user['email'])).encode('utf-8'))
      

    return Response(output.getvalue(), mimetype="text/plain")
Example #7
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())
Example #8
0
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
    )
Example #9
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
    )
Example #10
0
def index():
    return render_template(
        "index.html",
        user=check_auth(),
        talks=get_talks())
Example #11
0
def index():
    return render_template("index.html", user=check_auth(), talks=get_talks())