Ticket #3984: management.diff

File management.diff, 781 bytes (added by Tai Lee, 18 years ago)

add 'view' to list of default permissions and use verbose_name_plural in permission name.

  • django/contrib/auth/management.py

     
    1212def _get_all_permissions(opts):
    1313    "Returns (codename, name) for all permissions in the given opts."
    1414    perms = []
    15     for action in ('add', 'change', 'delete'):
    16         perms.append((_get_permission_codename(action, opts), 'Can %s %s' % (action, opts.verbose_name)))
     15    for action in ('add', 'change', 'delete', 'view'):
     16        perms.append((_get_permission_codename(action, opts), 'Can %s %s' % (action, opts.verbose_name_plural)))
    1717    return perms + list(opts.permissions)
    1818
    1919def create_permissions(app, created_models, verbosity):
Back to Top