Opened 19 years ago

Closed 19 years ago

Last modified 18 years ago

#309 closed defect (invalid)

tables with 'class' in them translate to 'classs' messing up inserts

Reported by: tjones@… 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 Adrian Holovaty, 19 years ago

Resolution: invalid
Status: newclosed

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 with db_name.

Please use IRC or the mailing lists for other such support questions -- not this ticket system.

comment:2 by anonymous, 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.
Back to Top