another large clean up of code, all POSTs are now using make_response() and returning json OR are for a form that flask handles with rendering direct html. Where there is a POST with json response, the jscript now calls CheckForJobs() to show it in the F/E. Removed several debugs. Fixed up undocumented BUG where import datetime was wrong, and prefix/suffix also to offer directories near the date of an image. Removed unused routes for clearing messages

This commit is contained in:
2023-01-12 16:47:43 +11:00
parent 8d9cf5279e
commit ef9f26189a
12 changed files with 45 additions and 58 deletions

4
ai.py
View File

@@ -1,6 +1,6 @@
from wtforms import SubmitField, StringField, HiddenField, validators, Form
from flask_wtf import FlaskForm
from flask import request, render_template, redirect
from flask import request, render_template, redirect, make_response
from main import db, app, ma
from sqlalchemy import Sequence
from sqlalchemy.exc import SQLAlchemyError
@@ -124,4 +124,4 @@ def get_face_from_image(face_id):
img_bytearray = img_bytearray.getvalue()
face_img = base64.b64encode(img_bytearray)
face_img = str(face_img)[2:-1]
return face_img
return make_response( face_img )