peewee
peewee copied to clipboard
Add method/hook for default table names
In our project we are using the singular form for the model names and the plural form for the tables. This means each of our models has to have class Meta: db_table = 'foos'. It'd be nice if there was a method or hook for defining the default table name algorithm that way it can be defined once. Currently it is coded directly into BaseModel.__new__.
Nice idea, be happy to add that.
Wow, thanks for such a quick response. That solution is awesome!