File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -111,12 +111,12 @@ Now try to get list of published posts again (press the up arrow button 3 times
111111
112112QuerySets 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
117117We 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
122122Cool! You're now ready for the next part! To close shell, type this:
You can’t perform that action at this time.
0 commit comments