Code

Opened 5 years ago

Closed 4 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: UI/UX:

Description

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.

Thanks.

Attachments (0)

Change History (2)

comment:1 Changed 4 years ago by russellm

  • Component changed from Core framework to Authentication
  • milestone set to 1.2
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 4 years ago by russellm

  • milestone 1.2 deleted
  • Resolution set to wontfix
  • Status changed from new to closed

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.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.