Changes between Initial Version and Version 1 of Ticket #8548
- Timestamp:
- Aug 25, 2008, 7:16:46 PM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #8548
- Property Component Database wrapper → django-admin.py
- Property Milestone → post-1.0
- Property Triage Stage Unreviewed → Accepted
-
Ticket #8548 – Description
initial v1 1 {{{ 2 #!python 1 3 class Thingie(models.Model) 2 4 #fields go here 3 5 class Meta: 4 6 verbose_name = 'A String Greater Than 50 Characters Long, Probably For The Admin' 7 }}} 5 8 6 9 Running 'python manage.py syncdb' results in MySQLdb trying to run the following: 7 10 {{{ 11 #!sql 8 12 INSERT INTO `auth_permission` (`name`, `content_type_id`, `codename`) VALUES (%s, %s, %s)(u'A String Greater Than 50 Characters Long, Probably For The Admin', 11, u'add_thingie') 13 }}} 9 14 10 15 The field `name` has a length restriction of 50 characters. This results in a warning 'error' being generated (_mysql_exceptions.Warning: Data truncated for column 'name' at row 1) but no further useful information. This also halts syncdb, which is also called during the test suite. 11 16 12 17 Suggestions (since I'm nowhere near qualified to contribute, yet): 13 - Maybe just catch the warning and ignore it? This seems to be a display-only field, so it probably won't hurt.14 - Or maybe catch the warning and explain the cause?15 - Model validator could complain about verbose_name being too long?16 - Increase the size of the field?17 - Maybe just let google index this ticket so that the next person to google the error sees why it happened?18 - Maybe just catch the warning and ignore it? This seems to be a display-only field, so it probably won't hurt. 19 - Or maybe catch the warning and explain the cause? 20 - Model validator could complain about verbose_name being too long? 21 - Increase the size of the field? 22 - Maybe just let google index this ticket so that the next person to google the error sees why it happened? 18 23 24 {{{ 19 25 Traceback (most recent call last): 20 26 File "manage.py", line 11, in <module> … … 63 69 raise message 64 70 _mysql_exceptions.Warning: Data truncated for column 'name' at row 1 71 }}}