diff options
Diffstat (limited to '')
-rw-r--r-- | database/models.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/database/models.py b/database/models.py index c731a08..2f9528a 100644 --- a/database/models.py +++ b/database/models.py @@ -1,9 +1,8 @@ -from peewee import Model, CharField, SqliteDatabase +from peewee import Model, CharField, TextField, PostgresqlDatabase import config -db = SqliteDatabase(config.DATABASE) -db.connect() +db = PostgresqlDatabase(config.DB, host=config.DB_HOST, port=config.DB_PORT, user=config.DB_USER, password=config.DB_PASS, autocommit=True, autorollback=True) class Page(Model): """ @@ -11,7 +10,7 @@ class Page(Model): """ url = CharField() title = CharField(null=True) - content = CharField(null=True) + content = TextField(null=True) class Meta: database = db |