Opened 18 years ago
Closed 18 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.
Note:
See TracTickets
for help on using tickets.
It's not misleading, it should work like that. See
django.db.models.manager::ForeignRelatedObjectsDescriptor.__set__