wip: programme
This commit is contained in:
parent
a1a9ce97ac
commit
170458b014
@ -52,6 +52,9 @@ except Exception as err:
|
||||
def page_not_found(err):
|
||||
return redirect(url_for('index'))
|
||||
|
||||
def get_slots():
|
||||
return backend.get(endpoint=f"events/{app.local_config['pretalx']['event']}/schedules/{app.local_config['pretalx']['schedule']}").json()
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# -- Custom filters
|
||||
# ------------------------------------------------------------------------------
|
||||
@ -87,7 +90,6 @@ def date2dmyhm(slot_type):
|
||||
"Exposition": "fa-solid fa-palette"}
|
||||
return slot_types[slot_type]
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# -- Routes
|
||||
# ------------------------------------------------------------------------------
|
||||
@ -103,10 +105,10 @@ def index():
|
||||
|
||||
@app.route('/planning', methods=['GET'])
|
||||
def planning():
|
||||
slots = backend.get(endpoint=f"events/{app.local_config['pretalx']['event']}/schedules/{app.local_config['pretalx']['schedule']}").json()
|
||||
slots = get_slots()
|
||||
return render_template("planning.html",
|
||||
slots=sorted(slots["slots"],
|
||||
key=lambda slot: slot["slot"]["start"]),
|
||||
key=lambda slot: slot["slot"]["start"]),
|
||||
navbar=navbar.get_from_page(page="/planning"))
|
||||
|
||||
@app.route('/place', methods=['GET'])
|
||||
@ -126,33 +128,57 @@ def goodies():
|
||||
|
||||
@app.route('/concerts', methods=['GET'])
|
||||
def concerts():
|
||||
return render_template("index.html",
|
||||
navbar=navbar.get_from_page(page="/concerts"))
|
||||
slots = get_slots()
|
||||
return render_template("planning.html",
|
||||
slots=sorted(slots["slots"],
|
||||
key=lambda slot: slot["slot"]["start"]),
|
||||
navbar=navbar.get_from_page(page="/concerts"),
|
||||
filter=["concerts", "dj set"])
|
||||
|
||||
@app.route('/workshops', methods=['GET'])
|
||||
def workshops():
|
||||
return render_template("index.html",
|
||||
navbar=navbar.get_from_page(page="/workshops"))
|
||||
slots = get_slots()
|
||||
return render_template("planning.html",
|
||||
slots=sorted(slots["slots"],
|
||||
key=lambda slot: slot["slot"]["start"]),
|
||||
navbar=navbar.get_from_page(page="/workshops"),
|
||||
filter=["workshop"])
|
||||
|
||||
@app.route('/screenings', methods=['GET'])
|
||||
def screenings():
|
||||
return render_template("index.html",
|
||||
navbar=navbar.get_from_page(page="/screenings"))
|
||||
slots = get_slots()
|
||||
return render_template("planning.html",
|
||||
slots=sorted(slots["slots"],
|
||||
key=lambda slot: slot["slot"]["start"]),
|
||||
navbar=navbar.get_from_page(page="/screenings"),
|
||||
filter=["screening"])
|
||||
|
||||
@app.route('/discussions', methods=['GET'])
|
||||
def discussions():
|
||||
return render_template("index.html",
|
||||
navbar=navbar.get_from_page(page="/discussions"))
|
||||
slots = get_slots()
|
||||
return render_template("planning.html",
|
||||
slots=sorted(slots["slots"],
|
||||
key=lambda slot: slot["slot"]["start"]),
|
||||
navbar=navbar.get_from_page(page="/discussions"),
|
||||
filter=["panel discussion"])
|
||||
|
||||
@app.route('/exhibitions', methods=['GET'])
|
||||
def exhibitions():
|
||||
return render_template("index.html",
|
||||
navbar=navbar.get_from_page(page="/exhibitions"))
|
||||
slots = get_slots()
|
||||
return render_template("planning.html",
|
||||
slots=sorted(slots["slots"],
|
||||
key=lambda slot: slot["slot"]["start"]),
|
||||
navbar=navbar.get_from_page(page="/exhibitions"),
|
||||
filter=["exhibition"])
|
||||
|
||||
@app.route('/talks', methods=['GET'])
|
||||
def talks():
|
||||
return render_template("index.html",
|
||||
navbar=navbar.get_from_page(page="/talks"))
|
||||
slots = get_slots()
|
||||
return render_template("planning.html",
|
||||
slots=sorted(slots["slots"],
|
||||
key=lambda slot: slot["slot"]["start"]),
|
||||
navbar=navbar.get_from_page(page="/talks"),
|
||||
filter=["talk", "light talk"])
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
@ -46,7 +46,7 @@
|
||||
Et pour plus de 40€, vous recevrez <span class="important">un lot de 4 stickers, un T-Shirt, un Tote bag et un sweat-shirt</span> estampillés du logo de l'édition 2023 du THSF.
|
||||
</p>
|
||||
<p>
|
||||
Nous sommes également conscients que la situation économique actuelle est difficile. C'est pourquoi nous nous engageons à ce que <span class="important">toutes les sommes qui dépasseront notre objectif de financement de 2 000 € seront reversées aux caisses des grévistes de la réforme des retraites</span>. Ainsi, votre contribution permettra également de soutenir une cause importante et de <span class="important">faire une différence dans la vie de ceux qui se battent pour nos droits</span>.
|
||||
Nous sommes également conscients que la situation actuelle est particulièrement difficile. C'est pourquoi nous nous engageons à ce que <span class="important">toutes les sommes qui dépasseront notre objectif de financement de 2 000 € seront reversées aux caisses des grévistes de la réforme des retraites</span>. Ainsi, votre contribution permettra également de soutenir une cause importante et de <span class="important">faire une différence dans la vie de ceux qui se battent pour nos droits</span>.
|
||||
</p>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@ -2,7 +2,13 @@
|
||||
{% block content %}
|
||||
<div id="schedule">
|
||||
{% for slot in slots %}
|
||||
{% include "slot.html" %}
|
||||
{% if filter %}
|
||||
{% if slot.submission_type.en | lower in filter %}
|
||||
{% include "slot.html" %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% include "slot.html" %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@ -52,6 +52,9 @@ except Exception as err:
|
||||
def page_not_found(err):
|
||||
return redirect(url_for('index'))
|
||||
|
||||
def get_slots():
|
||||
return backend.get(endpoint=f"events/{app.local_config['pretalx']['event']}/schedules/{app.local_config['pretalx']['schedule']}").json()
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# -- Custom filters
|
||||
# ------------------------------------------------------------------------------
|
||||
@ -87,7 +90,6 @@ def date2dmyhm(slot_type):
|
||||
"Exposition": "fa-solid fa-palette"}
|
||||
return slot_types[slot_type]
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# -- Routes
|
||||
# ------------------------------------------------------------------------------
|
||||
@ -103,10 +105,10 @@ def index():
|
||||
|
||||
@app.route('/planning', methods=['GET'])
|
||||
def planning():
|
||||
slots = backend.get(endpoint=f"events/{app.local_config['pretalx']['event']}/schedules/{app.local_config['pretalx']['schedule']}").json()
|
||||
slots = get_slots()
|
||||
return render_template("planning.html",
|
||||
slots=sorted(slots["slots"],
|
||||
key=lambda slot: slot["slot"]["start"]),
|
||||
key=lambda slot: slot["slot"]["start"]),
|
||||
navbar=navbar.get_from_page(page="/planning"))
|
||||
|
||||
@app.route('/place', methods=['GET'])
|
||||
@ -126,33 +128,57 @@ def goodies():
|
||||
|
||||
@app.route('/concerts', methods=['GET'])
|
||||
def concerts():
|
||||
return render_template("index.html",
|
||||
navbar=navbar.get_from_page(page="/concerts"))
|
||||
slots = get_slots()
|
||||
return render_template("planning.html",
|
||||
slots=sorted(slots["slots"],
|
||||
key=lambda slot: slot["slot"]["start"]),
|
||||
navbar=navbar.get_from_page(page="/concerts"),
|
||||
filter=["concerts", "dj set"])
|
||||
|
||||
@app.route('/workshops', methods=['GET'])
|
||||
def workshops():
|
||||
return render_template("index.html",
|
||||
navbar=navbar.get_from_page(page="/workshops"))
|
||||
slots = get_slots()
|
||||
return render_template("planning.html",
|
||||
slots=sorted(slots["slots"],
|
||||
key=lambda slot: slot["slot"]["start"]),
|
||||
navbar=navbar.get_from_page(page="/workshops"),
|
||||
filter=["workshop"])
|
||||
|
||||
@app.route('/screenings', methods=['GET'])
|
||||
def screenings():
|
||||
return render_template("index.html",
|
||||
navbar=navbar.get_from_page(page="/screenings"))
|
||||
slots = get_slots()
|
||||
return render_template("planning.html",
|
||||
slots=sorted(slots["slots"],
|
||||
key=lambda slot: slot["slot"]["start"]),
|
||||
navbar=navbar.get_from_page(page="/screenings"),
|
||||
filter=["screening"])
|
||||
|
||||
@app.route('/discussions', methods=['GET'])
|
||||
def discussions():
|
||||
return render_template("index.html",
|
||||
navbar=navbar.get_from_page(page="/discussions"))
|
||||
slots = get_slots()
|
||||
return render_template("planning.html",
|
||||
slots=sorted(slots["slots"],
|
||||
key=lambda slot: slot["slot"]["start"]),
|
||||
navbar=navbar.get_from_page(page="/discussions"),
|
||||
filter=["panel discussion"])
|
||||
|
||||
@app.route('/exhibitions', methods=['GET'])
|
||||
def exhibitions():
|
||||
return render_template("index.html",
|
||||
navbar=navbar.get_from_page(page="/exhibitions"))
|
||||
slots = get_slots()
|
||||
return render_template("planning.html",
|
||||
slots=sorted(slots["slots"],
|
||||
key=lambda slot: slot["slot"]["start"]),
|
||||
navbar=navbar.get_from_page(page="/exhibitions"),
|
||||
filter=["exhibition"])
|
||||
|
||||
@app.route('/talks', methods=['GET'])
|
||||
def talks():
|
||||
return render_template("index.html",
|
||||
navbar=navbar.get_from_page(page="/talks"))
|
||||
slots = get_slots()
|
||||
return render_template("planning.html",
|
||||
slots=sorted(slots["slots"],
|
||||
key=lambda slot: slot["slot"]["start"]),
|
||||
navbar=navbar.get_from_page(page="/talks"),
|
||||
filter=["talk", "light talk"])
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
@ -2,7 +2,13 @@
|
||||
{% block content %}
|
||||
<div id="schedule">
|
||||
{% for slot in slots %}
|
||||
{% include "slot.html" %}
|
||||
{% if filter %}
|
||||
{% if slot.submission_type.en | lower in filter %}
|
||||
{% include "slot.html" %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% include "slot.html" %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
Loading…
Reference in New Issue
Block a user