config pour utilisation du script dans flask

This commit is contained in:
Alex 2024-07-25 12:59:42 +00:00
parent 84b08f0d34
commit f9c4f68915

3
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, load_config
from main import main, traitement
app = Flask(__name__)
app.secret_key = 'your_secret_alex-design_key-2024'
@ -49,7 +49,6 @@ def index():
@login_required
def run():
filigramme = request.form['filigramme']
config = load_config()
result = traitement(filigramme) # on passe l'argument a la function 'main' du programme
return jsonify(result)