From 0f69687e68aaa72126d88c57be5829515f4a6bc6 Mon Sep 17 00:00:00 2001
From: strict falcon <73142098+zAFG57@users.noreply.github.com>
Date: Wed, 6 Oct 2021 13:02:21 +0200
Subject: [PATCH 1/5] Add files via upload
---
EcoleDirect.py | 1 +
main.py | 27 +++++++--------------------
2 files changed, 8 insertions(+), 20 deletions(-)
diff --git a/EcoleDirect.py b/EcoleDirect.py
index 610ca5c..455c885 100644
--- a/EcoleDirect.py
+++ b/EcoleDirect.py
@@ -125,3 +125,4 @@ def getCloud(self):
else:
# self.token = connection.json()['token']
return connection.json()['data']
+
\ No newline at end of file
diff --git a/main.py b/main.py
index 7b1b5dd..ea6e562 100644
--- a/main.py
+++ b/main.py
@@ -1,4 +1,3 @@
-
from EcoleDirect import *
from flask import Flask
from flask import render_template, url_for, request, redirect
@@ -11,21 +10,13 @@
@app.route('/')
def index():
- return f"""
- travail
-
- note
-
- message
- """
-
-
+ lien = ['travail','note','message']
+ return render_template('index.html',lien=lien)
@app.route('/travail')
def travail():
xzdfazfa = utilisateur.getHW()
json_dump = json.dumps(xzdfazfa)
json_object = json.loads(json_dump)
-
return render_template('travail.html',json_object=json_object)
@app.route('/travail/')
def travailjours(jours):
@@ -36,19 +27,14 @@ def travailjours(jours):
return render_template('travailjours.html',json_object=json_object)
-
@app.route('/note')
def note():
xzdfazfa = utilisateur.getNotes()
json_dump = json.dumps(xzdfazfa)
json_object = json.loads(json_dump)
- test = " "
- for y in json_object['notes']:
- test = f"{y['libelleMatiere']}: {y['valeur']} / {y['noteSur']} pour une moyenne de classe à {y['moyenneClasse']}"
- return f"""
- {test}
- """
-
+ liste = " "
+ return render_template('note.html',json_object=json_object, liste=liste)
+
@app.route('/message')
def message():
xzdfazfa = utilisateur.getmes()
@@ -65,4 +51,5 @@ def message():
{test}
"""
-app.run(host='0.0.0.0', port=80)
\ No newline at end of file
+app.run(host='127.0.0.1', port=8080)
+
\ No newline at end of file
From 0c4e80548c20121f8ede89dd37e2b66794823bcf Mon Sep 17 00:00:00 2001
From: strict falcon <73142098+zAFG57@users.noreply.github.com>
Date: Wed, 6 Oct 2021 13:03:29 +0200
Subject: [PATCH 2/5] Add files via upload
---
templates/index.html | 56 +++++++++++++++++++++++++++++++++
templates/note.html | 63 +++++++++++++++++++++++++++++++++++++
templates/travail.html | 10 +++++-
templates/travailjours.html | 2 +-
4 files changed, 129 insertions(+), 2 deletions(-)
create mode 100644 templates/index.html
create mode 100644 templates/note.html
diff --git a/templates/index.html b/templates/index.html
new file mode 100644
index 0000000..061a2c4
--- /dev/null
+++ b/templates/index.html
@@ -0,0 +1,56 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/templates/note.html b/templates/note.html
new file mode 100644
index 0000000..f214283
--- /dev/null
+++ b/templates/note.html
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
histoire géographie
+
+ allemand
+ physique chimie
+ anglais
+ mathématique
+
+
+ {%for i in json_object['notes']%}
+
+ {%endfor%}
+
+
+
+
+
+
+
diff --git a/templates/travail.html b/templates/travail.html
index 6bb5451..78742af 100644
--- a/templates/travail.html
+++ b/templates/travail.html
@@ -62,4 +62,12 @@
body, html {
background: #333
}
-
\ No newline at end of file
+ @media and screen (min-width: 900px) {
+ body {
+ bacground: #fff;
+ }
+ }
+
+
+
+
\ No newline at end of file
diff --git a/templates/travailjours.html b/templates/travailjours.html
index 4147740..11536e4 100644
--- a/templates/travailjours.html
+++ b/templates/travailjours.html
@@ -31,7 +31,7 @@
\ No newline at end of file
diff --git a/templates/note.html b/templates/note.html
index f214283..ba2bf1d 100644
--- a/templates/note.html
+++ b/templates/note.html
@@ -2,27 +2,46 @@
-
+
notes
-
+
-
-
-
histoire géographie
-
- allemand
- physique chimie
- anglais
- mathématique
+
+
histoire géographie
+
+
+
+
+
+
{%for i in json_object['notes']%}
{%endfor%}
@@ -30,34 +49,4 @@ histoire géographie
-
-
+