Opened 5 years ago
Last modified 5 years ago
#30778 closed Cleanup/optimization
keep the table name lowercase — at Version 1
Reported by: | lintong | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
if possible, to avoid any problems that might arise from this behavior. Django uses lowercase table names when it auto-generates table names from models, so this is mainly a consideration if you are overriding the table name via the db_table parameter.
--django don't avoid the app label maybe uppercase, it should be
'self.db_table = "%s_%s" % (self.app_label.lower(), self.model_name)'
Note:
See TracTickets
for help on using tickets.