Re: Auto-truncated fields at max_length

2010-08-05 Thread Xavier Ordoquy
Hi, > I would prefer to instead auto-truncate the value (so I don't have an > exception). Now, I can do this manually, but what I would really want is to > have all of my models auto-truncate the value. (Not necessarily > intelligently. Just cutting it off at the 999th character is fine.) >

Re: Auto-truncated fields at max_length

2010-08-05 Thread Masklinn
On 5 août 2010, at 01:35, Samuel Clay wrote: > I have a field that has a max_length set. When I save a model instance, and > the field's value is > than max_length, Django enforces that max_length at > the database level. (See Django docs on models: >

Auto-truncated fields at max_length

2010-08-04 Thread Samuel Clay
I have a field that has a max_length set. When I save a model instance, and the field's value is > than max_length, Django enforces that max_length at the database level. (See Django docs on models: http://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.CharField.max_length)