#18866: model Meta verbose_name too long error message not obvious ------------------------------+------------------------------------ Reporter: elena | Owner: nobody Type: Bug | Status: new Component: contrib.auth | Version: 1.4 Severity: Normal | Resolution: Keywords: | Triage Stage: Accepted Has patch: 1 | Needs documentation: 0 Needs tests: 1 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 ------------------------------+------------------------------------
Comment (by toyg): Ok, the problem is a bit more complex, and the abovementioned patch does not fix it. The problem is that verbose_name is used to generate the auth_permission table; the "name" field in that table is set to varchar(50) (at least on PostgreSQL), but this record actually includes sentences ("Can add <verbose_name>", "Can delete <verbose_name>" and so on); so '''the actual practical limit is 39 characters for verbose_name'''. This is a weird number, common knowledge is that verbose_name can be up to 50 characters. So the real fix is either to widen that field to 61 or more (50 + "Can delete ", which is 11 characters), or document that the limit is 39 on non-sqlite backends. I have a test and a fix for the validator to spot values that are too long, but there's no point in submitting a pull request if this point isn't settled first. -- Ticket URL: <https://code.djangoproject.com/ticket/18866#comment:10> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/063.e563a58b9f9def8b4bda8ddba33fdd60%40djangoproject.com. For more options, visit https://groups.google.com/groups/opt_out.