Skip to content

Commit

Permalink
Removed unnecessary .all() calls in django_orm chapter.
Browse files Browse the repository at this point in the history
  • Loading branch information
bmispelon committed Aug 24, 2014
1 parent 34e86c7 commit c3ebf72
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions django_orm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,12 @@ Now try to get list of published posts again (press the up arrow button 3 times

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

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

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

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

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

0 comments on commit c3ebf72

Please sign in to comment.