I have to find the database table name of resoective model in my project, how can i do it . I previously tried the
class Meta:
db_table = 'tablenameIWant'
but how can I see the table name ?
The Meta class of models can be accessed with the _meta attribute. So:
MyModel._meta.db_table
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.