Opened 5 years ago

Closed 5 years ago

Last modified 5 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 Changed 5 years ago by Tim Graham

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 Changed 5 years ago by yakoub abaya <sting606@…>

yes, sorry for this mistake .

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

comment:3 Changed 5 years ago by Tim Graham

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 Changed 5 years ago by yakoub abaya <sting606@…>

yes, i apologize again .

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