The name field in Permission model in django.contrib.auth module causes 
problems when one of the fields' verbose_name length is larger than 39 
characters because it's maximum length is 50. 
(https://github.com/django/django/blob/master/django/contrib/auth/models.py#L63)
Django automatically prepend "Can change", "Can delete" and "Can add" words 
to fields' verbose names for name column when inserting rows to 
auth_permission table so limits the maximum length of a verbose name to 39 
character.
When syncdb command is run, Django throws a database exception saying "Data 
truncated for column 'name' at row x" in this case. I think the length of 
name field is quite low but if you prefer to limit that field to 50 
character, Django should not allow verbose name attribute to be larger than 
39 character.

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/a6266504-6339-46fb-8774-bc4254f24037%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to