Opened 17 years ago

Closed 17 years ago

#5091 closed (worksforme)

misleading example in groups documentation

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

Description

There's something to the effect of
user.groups = [group list]
and
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 by Chris Beaven, 17 years ago

Resolution: worksforme
Status: newclosed

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