On Dec 16, 9:47 pm, mtnpaul <[email protected]> wrote: > I'm not looking for an answer, just thought I would post this problem > so if someone else gets it they'll have one place to look anyways. > > I had a model with some field names greater than 31 characters. Since > most databases restrict column name length to 31 characters I would > get this error when trying to use a default form for a model. > > I actually knew of this limit, but did not realize it would through an > error here. It seems that it should have come up (been flagged) during > a syncdb, and perhaps with another database backend it would. > > One cure for this is to shorten the model field name. Another option > (not tested) would be to specify a db column name that was shorter. > > environment was Django 1.1 with sqlite3 > > On a related note: > > Is this information useful to the community? Should it be posted in > another place? (TRAC ? WIKI ?) > > If this is an inappropriate posting please let me know. > > Thanks, > > Paul
The backends are supposed to automatically truncate column names that would be longer than the database limit. I'm not sure how having a too long column name results in the particular error you're reporting, but if an untruncated column name is being passed to the database, that's a bug, and you should create a ticket for it. Ian -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

