added reference image class, also tweaked DB classes to have foreign keys, so you cant delete a person connected to a file (tested). Also made refimg class do some quirky bootstrap/jquery to get file dialogs not looking like crap
This commit is contained in:
11
main.py
11
main.py
@@ -30,6 +30,17 @@ Bootstrap(app)
|
||||
from settings import Settings
|
||||
from files import Files
|
||||
from person import Person
|
||||
from refimg import Refimg
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user