Skip to content

Commit

Permalink
Docs update
Browse files Browse the repository at this point in the history
  • Loading branch information
timmartin19 committed Nov 9, 2015
1 parent 4fdb4df commit cfcf1d6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/source/topics/relationships_and_links.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Cookbook

.. testsetup:: queryargs, embedded, linktolist

from ripozo import ResourceBase, apimethod, Relationship, ListRelationship
from ripozo import ResourceBase, apimethod, Relationship, ListRelationship, FilteredRelationship

A link with query args
^^^^^^^^^^^^^^^^^^^^^^
Expand Down Expand Up @@ -213,7 +213,7 @@ If embedded was not equal to true we would only get the links to the resources i
wanted to point to a location where you could explicitly get the children
for a specific parent. It's generally considered more RESTful to hit
point to an endpoint like ``'/children?parent_id=1'`` than ``'/parent/1/children'``.
Fortunately this is extremely easy in ripozo.
Fortunately this is extremely easy in ripozo with the :class: `FilteredRelationship` class.

*NOTE* If you are using a manager than you can use the ``restmixins.Retrieve`` and/or
``restmixins.RetrieveList`` instead of explicitly declaring the retrieve methods.
Expand All @@ -224,7 +224,7 @@ If embedded was not equal to true we would only get the links to the resources i
class Parent(ResourceBase):
pks = ('id',)
relationships = (
Relationship('children', relation='Child', property_map=dict(id='parent_id'), no_pks=True, query_args=['parent_id']),
FilteredRelationship('children', relation='Child', property_map=dict(id='parent_id')),
)

@apimethod()
Expand Down

0 comments on commit cfcf1d6

Please sign in to comment.