Replace database methods with peewee ORM #39
1 changed files with 4 additions and 1 deletions
|
@ -18,12 +18,15 @@ def get_database_connection():
|
|||
return db
|
||||
|
||||
|
||||
|
||||
database_proxy = DatabaseProxy()
|
||||
database = get_database_connection()
|
||||
database_proxy.initialize(database)
|
||||
|
||||
|
||||
class BaseModel(Model):
|
||||
class Meta:
|
||||
database = database
|
||||
database = database_proxy
|
||||
|
||||
|
||||
class Channel(BaseModel):
|
||||
|
|
Loading…
Reference in a new issue