Opened 5 years ago

Closed 2 years ago

#14451 closed New feature (wontfix)

add related_name to contrib.auth.models.User for 'groups'

Reported by: tvon Owned by: anonymous
Component: contrib.auth Version: 1.2
Severity: Normal Keywords:
Cc: Triage Stage: Design decision needed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Would allow for

from django.contrib.auth.models import Group
group = Group.objects.all()[0]
group.members.all()

instead of the current

group.users_set.all()

You know, nexttime someone feels like kicking backwards compatibility in the groin...

Change History (7)

comment:1 Changed 5 years ago by lukeplant

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Someday/Maybe

comment:2 Changed 5 years ago by anonymous

  • Owner changed from nobody to anonymous
  • Status changed from new to assigned

comment:3 Changed 4 years ago by julien

  • Severity set to Normal
  • Type set to New feature

comment:4 Changed 4 years ago by thejaswi_puthraya

  • Component changed from Uncategorized to contrib.auth
  • Easy pickings unset
  • UI/UX unset

comment:5 Changed 4 years ago by jacob

Milestone 2.0 deleted

comment:6 Changed 3 years ago by aaugustin

  • Triage Stage changed from Someday/Maybe to Design decision needed

This can be done with a deprecation path right now if we want to. During the transition, Group.users_set would be a property raising a deprecation warning and returning members.

However I don't know if there's much value in forcing this change upon all users of Django.

comment:7 Changed 2 years ago by aaugustin

  • Resolution set to wontfix
  • Status changed from assigned to closed

Actually, I cannot convinced myself there's enough value.

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