Model django.contrib.auth.models.Group should have a title or description field
|Reported by:||linuxerwang@…||Owned by:||nobody|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||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:
- 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.
- Modify the definition of django.contrib.auth.models.Group to:
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 5 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