Opened 8 years ago

Closed 8 years ago

#5091 closed (worksforme)

misleading example in groups documentation

Reported by: anonymous Owned by: jacob
Component: Documentation Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


There's something to the effect of
user.groups = [group list]
user.permissions = [permission list]

which would of course give an error, since those are managers. You need a .all() to get an iterable.

Change History (1)

comment:1 Changed 8 years ago by SmileyChris

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to worksforme
  • Status changed from new to closed

It's not misleading, it should work like that. See django.db.models.manager::ForeignRelatedObjectsDescriptor.__set__

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