Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#21576 closed Uncategorized (invalid)

repr and len

Reported by: yakoub abaya <sting606@…> Owned by: nobody
Component: Documentation Version: 1.6
Severity: Normal 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

Queryset doesn't have methods len() and repr() as claimed under https://docs.djangoproject.com/en/1.6/ref/models/querysets/#when-querysets-are-evaluated

Change History (4)

comment:1 by Tim Graham, 11 years ago

Resolution: invalid
Status: newclosed

You call these methods with the queryset as an argument. For example, len(Entry.objects.all()). This is just like list() below which has an example.

comment:2 by yakoub abaya <sting606@…>, 11 years ago

yes, sorry for this mistake .

but on other topic, calling list produces this error "'QuerySet' object has no attribute 'META'"

comment:3 by Tim Graham, 11 years ago

I'm guessing it's a mistake in your code, but this isn't the place to get help with that. Here's a link to the proper channels.

https://code.djangoproject.com/wiki/TicketClosingReasons/UseSupportChannels

comment:4 by yakoub abaya <sting606@…>, 11 years ago

yes, i apologize again .

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