Вы настроили базу данных и подключились к ней? Это должно выглядеть примерно так:
# define a database connection
database = peewee.SqliteDatabase('my.db')
class BaseModel(peewee.Model):
class Meta:
# this is likely the missing part of your model
# you need to tell the model which database connection to use.
database = database
class User(BaseModel):
first_name = peewee.CharField()
last_name = peewee.CharField()
email = peewee.CharField()
subject = peewee.CharField()
message = peewee.CharField()