#309 closed defect (invalid)
tables with 'class' in them translate to 'classs' messing up inserts
Reported by: | Owned by: | Adrian Holovaty | |
---|---|---|---|
Component: | contrib.admin | Version: | 1.0 |
Severity: | major | 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
I have a table called 'documentclass' and for some reason django translates that to 'documentclasss' when displaying and doing inserts. This prevents inserts from happening correctly.
Change History (2)
comment:1 by , 19 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:2 by , 19 years ago
He may be referring to the algorithm used to pluralize model names. Does it correctly handle model names that end in 's', such as "DocumentClass" which should be pluralized as "DocumentClasses"?
Note:
See TracTickets
for help on using tickets.
Your description is vague, but, from what I can tell, you need to set
db_name='documentclass'
in your model. By default Django adds an "s" to the end of the table name, but you can manually override it withdb_name
.Please use IRC or the mailing lists for other such support questions -- not this ticket system.