Use aiosqlite and add service for templates

This commit is contained in:
grossmj committed 2021-03-28 21:17:29 +10:30
1 parent d730c591b3
commit 0fea3f969e
14 files changed
+290 -230

No files matched your search

+3 -3
View File
@@ -27,14 +27,14 @@ from sqlalchemy.ext.declarative import as_declarative
@as_declarative()
class Base:
def _asdict(self):
def asdict(self):
return {c.key: getattr(self, c.key)
for c in inspect(self).mapper.column_attrs}
def _asjson(self):
def asjson(self):
return jsonable_encoder(self._asdict())
return jsonable_encoder(self.asdict())
class GUID(TypeDecorator):