Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#20965 closed Uncategorized (invalid)

Why do DetailView use .filter() instead of .get()?

Reported by: anonymous Owned by: nobody
Component: Generic views Version: 1.5
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


In django.views.generic.detail in the get_object() method it will do; queryset = queryset.filter() and I wonder why it doesn't .get()?

Change History (3)

comment:1 Changed 6 years ago by anonymous

Component: UncategorizedGeneric views

comment:2 Changed 6 years ago by Tim Graham

Resolution: invalid
Status: newclosed

There's a get() call on line 52, after various filter()s have been applied. This ticket tracker isn't really the place to ask these questions though, please see

comment:3 Changed 6 years ago by anonymous

I see, I'm so sorry for that.

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