Skip to content

Commit

Permalink
Merge pull request #35 from ShinJJang/fix_typo_f_query
Browse files Browse the repository at this point in the history
Fix typo
  • Loading branch information
yashrastogi16 committed Jul 31, 2018
2 parents 638b5d9 + 17b4aa0 commit 8a1e0d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/f_query.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ How to filter a queryset with criteria based on comparing their field values

Django ORM makes it easy to filter based on fixed values.
To get all :code:`User` objects with :code:`first_name` starting with :code:`'R'`,
you can do :code:`User.objects.filter(name_startswith='R')`.
you can do :code:`User.objects.filter(first_name__startswith='R')`.

What if you want to compare the first_name and last name?
You can use the :code:`F` object. Create some users first.
Expand Down

0 comments on commit 8a1e0d0

Please sign in to comment.