Ticket #8548: validate_verbose_8564.2.diff

File validate_verbose_8564.2.diff, 676 bytes (added by marcelor, 6 years ago)

Modified patch with more informative error message.

  • django/core/management/validation.py

     
    218218                    if f not in opts.local_fields:
    219219                        e.add(opts, '"unique_together" refers to %s. This is not in the same model as the unique_together statement.' % f.name)
    220220
     221        # Check verbose_name length
     222        if len(opts.verbose_name) > 39:
     223            e.add(opts, 'verbose_name "%s..." is too long. It must be 39 characters long at most.' % opts.verbose_name[:39])
     224
    221225    return len(e.errors)
Back to Top