diff options
author | Matt Arnold | 2025-04-09 15:24:29 -0400 |
---|---|---|
committer | Matt Arnold | 2025-04-09 15:24:29 -0400 |
commit | d1745a9c1e46d43af005ac966cf4170192b76f97 (patch) | |
tree | 7de2e583ce0729915ac33dd177099c29ef5d432d /models.py | |
parent | d6b7302b791b95b69dd2334e1119e697bd58cab3 (diff) |
Supercommit
Diffstat (limited to 'models.py')
-rw-r--r-- | models.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/models.py b/models.py index 955a70a..75af58b 100644 --- a/models.py +++ b/models.py @@ -1,7 +1,8 @@ -from peewee import Model, CharField, TextField, DateTimeField +from peewee import Model, CharField, TextField, DateTimeField, SqliteDatabase from datetime import datetime -from app import db - +from config import dbloc +# from app import db +db = SqliteDatabase(dbloc) class BaseModel(Model): class Meta: database = db @@ -11,4 +12,4 @@ class Post(BaseModel): content = TextField() created_at = DateTimeField(default=datetime.now) -db.create_tables([Post]) \ No newline at end of file +db.create_tables([Post]) |