Code

Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#309 closed defect (invalid)

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

Reported by: tjones@… Owned by: adrian
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: UI/UX:

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.

Attachments (0)

Change History (2)

comment:1 Changed 9 years ago by adrian

  • Resolution set to invalid
  • Status changed from new to closed

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 Changed 9 years ago by anonymous

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"?

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.