Skip to content

Commit f95138d

Browse files
committed
Merge pull request DjangoGirls#120 from Railslide/QuerySet-typos
Fixed minor QuerySet typos
2 parents 35076d9 + 4c18977 commit f95138d

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

django_orm/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ The effect should be like this:
1919
(InteractiveConsole)
2020
>>>
2121

22-
You're know in Django's interactive console. It's just like Python prompt but with some additional Django magic :) You can use all Python commands here too, of course.
22+
You're now in Django's interactive console. It's just like Python prompt but with some additional Django magic :) You can use all Python commands here too, of course.
2323

2424
### All objects
2525

@@ -64,7 +64,7 @@ Cool! Let's get an instance of the user now:
6464

6565
As you can see, we know `get` a `User` with a `username` that equals to 'ola'. Neat! Of course, you have to adjust it to your username.
6666

67-
Now we can finally create our first po that:
67+
Now we can finally create our first post:
6868

6969
>>> Post.objects.create(author = user, title = 'Sample title', text = 'Test')
7070

@@ -79,7 +79,7 @@ You can know have a little fun and add more posts to see how it works. Add 2-3 m
7979

8080
### Filter objects
8181

82-
Big part of QuerySets is an ability to filter them. Let's say, we want to find all posts that are authored by User ola. We will use it instead of `all` in `Post.objects.all()`. In parentheses we will state what condition(s) needs to be met by a blog post to end up in our queryset. In our situation it is `author` that is equal to `user`. The way to write it in Django is: `author=user`. Now our piece of code looks like that:
82+
Big part of QuerySets is an ability to filter them. Let's say, we want to find all posts that are authored by User ola. We will use `filter` instead of `all` in `Post.objects.all()`. In parentheses we will state what condition(s) needs to be met by a blog post to end up in our queryset. In our situation it is `author` that is equal to `user`. The way to write it in Django is: `author=user`. Now our piece of code looks like that:
8383

8484
>>> Post.objects.filter(author = user)
8585
[<Post: Sample title>, <Post: Post number 2>, <Post: My 3rd post!>, <Post: 4th title of post>]

0 commit comments

Comments
 (0)