wip: programme
This commit is contained in:
@@ -52,10 +52,6 @@ except Exception as err:
|
||||
def page_not_found(err):
|
||||
return redirect(url_for('index'))
|
||||
|
||||
def get_days():
|
||||
days = ["26/05", "27/05", "28/05"]
|
||||
return [{"title": f"Jour #{index+1}", "date": day} for index, day in enumerate(days)]
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# -- Custom filters
|
||||
# ------------------------------------------------------------------------------
|
||||
@@ -69,6 +65,16 @@ def date2dmyhm(date):
|
||||
hour, minutes = (splitted_time[0], splitted_time[1].split("+")[0])
|
||||
return f"{day}/{month} {hour}:{minutes}"
|
||||
|
||||
@app.template_filter('date2dayclass')
|
||||
def date2dayclass(date):
|
||||
classes = {"26/05": "bg1",
|
||||
"27/05": "bg2",
|
||||
"28/05": "bg3",}
|
||||
splitted_date = date.split("-")
|
||||
month, day = (splitted_date[1],
|
||||
splitted_date[2].split("T")[0])
|
||||
return classes[f"{day}/{month}"]
|
||||
|
||||
@app.template_filter('toicon')
|
||||
def date2dmyhm(slot_type):
|
||||
slot_types = {"Projection": "fa-solid fa-film",
|
||||
|
||||
Reference in New Issue
Block a user