Lenylvt commited on
Commit
9c01cbc
β€’
1 Parent(s): 281b1c5

Update pages/devoirs.py

Browse files
Files changed (1) hide show
  1. pages/devoirs.py +3 -3
pages/devoirs.py CHANGED
@@ -33,9 +33,9 @@ def app(client):
33
 
34
  def display_homework_list(homeworks, client):
35
  for homework in homeworks:
36
- with st.expander(f"{"βœ…" if homework.done else "❌"} | {homework.subject.name} - *pour le {homework.date.strftime('%d/%m/%Y')}*"):
37
  st.markdown(f"""
38
- - **Statut :** {"βœ… Fait" if homework.done else "❌ Γ€ faire"}
39
  - **Description :** {homework.description}
40
  """, unsafe_allow_html=True)
41
 
@@ -43,7 +43,7 @@ def display_homework_list(homeworks, client):
43
  unique_key = str(uuid.uuid4()) # Generate a unique key
44
 
45
  # Use the unique key for the button to avoid DuplicateWidgetID error
46
- st.button("βœ… Marquer comme fait" if not homework.done else "❌ Marquer comme Γ  faire", key=unique_key, on_click=update_homework_status, args=(homework, client))
47
 
48
  def update_homework_status(homework, client):
49
  new_status = not homework.done
 
33
 
34
  def display_homework_list(homeworks, client):
35
  for homework in homeworks:
36
+ with st.expander(f"{"\u2705" if homework.done else "❌"} | {homework.subject.name} - *pour le {homework.date.strftime('%d/%m/%Y')}*"):
37
  st.markdown(f"""
38
+ - **Statut :** {"\u2705 Fait" if homework.done else "❌ Γ€ faire"}
39
  - **Description :** {homework.description}
40
  """, unsafe_allow_html=True)
41
 
 
43
  unique_key = str(uuid.uuid4()) # Generate a unique key
44
 
45
  # Use the unique key for the button to avoid DuplicateWidgetID error
46
+ st.button("\u2705 Marquer comme fait" if not homework.done else "❌ Marquer comme à faire", key=unique_key, on_click=update_homework_status, args=(homework, client))
47
 
48
  def update_homework_status(homework, client):
49
  new_status = not homework.done