Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- AttributeError: type object 'BaseModel' has no attribute 'Meta'
- import peewee as pw
- class BaseModel(pw.Model):
- class Meta:
- database = pw.Proxy()
- @classmethod
- def configure_proxy(cls, database: pw.Database):
- cls.Meta.database.initialize(database)
- import peewee as pw
- class BaseModel(pw.Model):
- class MyMeta:
- database = pw.Proxy()
- @classmethod
- def configure_proxy(cls, database: pw.Database):
- cls.MyMeta.database.initialize(database)
- class BaseModel(pw.Model):
- class Meta:
- database = pw.Proxy()
- @classmethod
- def configure_proxy(cls, database: pw.Database):
- cls._meta.database.initialize(database)
Add Comment
Please, Sign In to add comment