Compare commits

..

No commits in common. "f166b1c3bccd01a7197a3153be6a5bb0793fd89c" and "8dbe4e03db7727a37bfa5c01f06c4aa2233b5f1a" have entirely different histories.

10
app.py
View File

@ -1,7 +1,7 @@
from flask import Flask, render_template, request, redirect, url_for, jsonify, flash
from flask_login import LoginManager, UserMixin, login_user, login_required, logout_user, current_user
import json
from main import main, traitement
from main import main, load_config
app = Flask(__name__)
app.secret_key = 'your_secret_alex-design_key-2024'
@ -11,7 +11,7 @@ login_manager.init_app(app)
login_manager.login_view = 'login'
# Utilisateurs fictifs pour l'exemple
users = {'AlexDesign': {'password': 'gb7b1-S7ECGxlcZMi5cnT'}}
users = {'admin': {'password': 'password'}}
class User(UserMixin):
def __init__(self, username):
@ -49,9 +49,9 @@ def index():
@login_required
def run():
filigramme = request.form['filigramme']
result = traitement(filigramme) # on passe l'argument a la function 'main' du programme
config = load_config()
result = my_function({}, filigramme)
return jsonify(result)
if __name__ == '__main__':
app.run(host='0.0.0.0', port=5000, debug=True)
app.run(debug=True)