Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
ParsePy
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ParsePy
Commits
2001c5ec
Commit
2001c5ec
authored
Jul 27, 2013
by
Raphael Lullis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Missed a couple of examples that were using 'where' instead of the new 'filter'. Fixed.
parent
529e3d44
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
README.mkd
+2
-2
No files found.
README.mkd
View file @
2001c5ec
...
...
@@ -315,7 +315,7 @@ Most importantly, Querysets can be chained together. This allows you
to make more complex queries:
~~~
~~ {python}
posts_by_joe = Post.Query.all().
where
(author='Joe').order_by("view_count")
posts_by_joe = Post.Query.all().
filter
(author='Joe').order_by("view_count")
popular_posts = posts_by_joe.gte(view_count=200)
~~~
~~
...
...
@@ -325,7 +325,7 @@ After all the querying/filtering/sorting, you will probably want to do
something with the results. Querysets can be iterated on:
~~~
~~ {python}
posts_by_joe = Post.Query.all().
where
(author='Joe').order_by('view_count')
posts_by_joe = Post.Query.all().
filter
(author='Joe').order_by('view_count')
for post in posts_by_joe:
print post.title, post.publication_date, post.text
~~~
~~
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment