Skip to content

Commit 8e1889d

Browse files
committed
Removed unnecessary .all() calls in django_orm chapter.
1 parent 2597235 commit 8e1889d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

django_orm/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,12 @@ Now try to get list of published posts again (press the up arrow button 3 times
111111

112112
QuerySets also allow you to order the list of objects. Let's try to order them by `created_date` field:
113113

114-
>>> Post.objects.all().order_by('created_date')
114+
>>> Post.objects.order_by('created_date')
115115
[<Post: Sample title>, <Post: Post number 2>, <Post: My 3rd post!>, <Post: 4th title of post>]
116116

117117
We can also reverse the ordering by adding `-` at the beggining:
118118

119-
>>> Post.objects.all().order_by('-created_date')
119+
>>> Post.objects.order_by('-created_date')
120120
[<Post: 4th title of post>, <Post: My 3rd post!>, <Post: Post number 2>, <Post: Sample title>]
121121

122122
Cool! You're now ready for the next part! To close shell, type this:

0 commit comments

Comments
 (0)