I want to set the db_table Meta class attribute in a base class so that all inherited classes will have their names in it, similar to how Django treats related_name model field attribute:
class BaseModel(models.Model):
class Meta:
db_table = 'prefix_%(class)s'
So the inherited model:
class SubModel(BaseModel):
pass
will have db table prefix_submodel.
Is that possible? Can the Meta class access the inheriting class' model name?
TypeError: format requires a mappingduring syncdb.