Skip to content

Commit 13a3c99

Browse files
Fix incorrect example
1 parent 8d83ff8 commit 13a3c99

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docs/api-guide/generic-views.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ May be overridden to provide dynamic behavior such as returning a queryset that
9292
For example:
9393

9494
def get_queryset(self):
95-
return self.user.accounts.all()
95+
user = self.request.user
96+
return user.accounts.all()
9697

9798
#### `get_object(self)`
9899

0 commit comments

Comments
 (0)