added basic view of which files were matched with which people
This commit is contained in:
5
ai.py
5
ai.py
@@ -5,10 +5,13 @@ from main import db, app, ma
|
||||
from sqlalchemy import Sequence
|
||||
from sqlalchemy.exc import SQLAlchemyError
|
||||
from status import st, Status
|
||||
from files import Entry, File
|
||||
from person import File_Person_Link
|
||||
|
||||
################################################################################
|
||||
# /aistats -> placholder for some sort of stats
|
||||
################################################################################
|
||||
@app.route("/aistats", methods=["GET", "POST"])
|
||||
def aistats():
|
||||
return render_template("aistats.html", page_title='Placeholder')
|
||||
entries=db.session.query(Entry).join(File).join(File_Person_Link).filter(File_Person_Link.file_id==File.eid).all()
|
||||
return render_template("aistats.html", page_title='Placeholder', entries=entries)
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block main_content %}
|
||||
<h3>Placeholder</h3>
|
||||
<h3>Basic AI stats</h3>
|
||||
<table class="table table-striped table-sm">
|
||||
<tbody><thead class="thead-light"><tr><th>File</th><th>AI Matched people</th></thead>
|
||||
{% for e in entries %}
|
||||
<tr><td>{{e.name}}</td><td>
|
||||
{% for p in e.file_details[0].people %}
|
||||
{{p.tag}}
|
||||
{% endfor %}
|
||||
</td></tr>
|
||||
{% endfor %}
|
||||
</tbody></table>
|
||||
{% endblock main_content %}
|
||||
|
||||
Reference in New Issue
Block a user