Now it reads my emails and writes down the sender and content, I just need to implement that it only reads emails sent from my school and downloads the attachment to pass to 'update_time_school.py' which will do the rest of the work.

This commit is contained in:
Stefano Assenzo
2022-12-28 15:04:42 +00:00
parent 74d1ef52c6
commit 6b7f0f86b6
3 changed files with 49 additions and 4 deletions

10
app.py
View File

@ -1,6 +1,7 @@
from src.script import api_test
from flask import Flask, render_template, request, redirect, session, url_for, jsonify
#from src.script import api_test
from flask import Flask, render_template, request, session, jsonify
import requests
import bcrypt
import os
app = Flask(__name__)
@ -16,12 +17,15 @@ def homepage():
@app.route('/orario')
def orario():
return render_template('html/orario.html')
if 'username' in session:
return "You are logged in as " + session['username']
#return render_template('html/orario.html')
@app.route('/calendario')
def calendario():
return render_template('html/calendario.html')
# Da sistemare
@app.route('/api', methods = ['GET', 'POST'])
def api():
if(request.method == 'GET'):