Opened 9 years ago

Closed 9 years ago

#11690 closed (wontfix)

Model django.contrib.auth.models.Group should have a title or description field

Reported by: linuxerwang@… Owned by: nobody
Component: contrib.auth Version: 1.1
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


In my project I need to make the display of Group names understandable for Chinese customers. The current Group object only defines a name field which is better to be western charactered because it's often referenced by name in program. The group objects need to be added by customers on the fly, so we can't use po translation, and they prefer to be able to manually input both the name and a description.

Currently we have two ways to solve it:

  1. Create a class which extends Group and adds a description field pros: Works, and non-intrusive to django platform. cons: It's simply ugly to use and looks redundant bad design.
  1. Modify the definition of django.contrib.auth.models.Group to:

class Group(models.Model):

name = models.CharField(_('name'), max_length=80, unique=True)

+ desc = models.CharField(_('desc'), max_length=80)


pros: Clearner design.
cons: Needs to modify the django source code, which brings the risk of potentially violating the license. And have to do it again and again when django is upgraded.

Strongly suggest the official django release can add one more field for Group. Don't understand why Permission model has a name field and a codename field while Group model has only one a field.

Maybe the naming here is confusing, but if django release can add a codename field to Group just like Permission, it will still be good.


Change History (2)

comment:1 Changed 9 years ago by Russell Keith-Magee

Component: Core frameworkAuthentication
milestone: 1.2
Triage Stage: UnreviewedAccepted

comment:2 Changed 9 years ago by Russell Keith-Magee

milestone: 1.2
Resolution: wontfix
Status: newclosed

Don't know what I was thinking here. While the idea may be sound, changing models like this is a non-trivial job and would probably require a wholesale replacement of the permissions system. Marking wontfix due to the impracticality.

Note: See TracTickets for help on using tickets.
Back to Top