Added the ability to add a reference image to a person, and connect the two in the db

This commit is contained in:
2021-01-15 16:55:12 +11:00
parent 3191fb650b
commit 588980a260
4 changed files with 35 additions and 12 deletions

View File

@@ -35,13 +35,6 @@ from job import Job
from ai import *
####################################### CLASSES / DB model #######################################
class Person_Refimg_Link(db.Model):
__tablename__ = "person_refimg_link"
person_id = db.Column(db.Integer, db.ForeignKey('person.id'), unique=True, nullable=False, primary_key=True)
refimg_id = db.Column(db.Integer, db.ForeignKey('refimg.id'), unique=True, nullable=False, primary_key=True)
def __repr__(self):
return "<person_id: {}, refimg_id>".format(self.person_id, self.refimg_id)
####################################### GLOBALS #######################################
# allow jinja2 to call these python functions directly