Improved the photo sidebar and add the add_photo_modal.py to add photos and the file_picker_modal.py to select the proper file to be ingested, also changed photo.py and photo_service.py to receive a datatime and not a string representing the addition date

This commit is contained in:
Gustavo Henrique Santos Souza de Miranda
2025-06-29 21:38:33 -03:00
parent 84b0397263
commit f84da2c934
10 changed files with 226 additions and 58 deletions
+5 -2
View File
@@ -12,10 +12,13 @@ class Database:
echo=False,
connect_args={"check_same_thread": False},
)
self.session = sessionmaker(bind=self.engine, autoflush=False, autocommit=False)
self._session_maker = sessionmaker(bind=self.engine, autoflush=False, autocommit=False)
def create(self):
Base.metadata.create_all(self.engine)
def session(self):
return self._session_maker()
def get_db(self):
return self.session()
return self._session_maker()