Beispiel #1
0
 class ItemSelection(restmixins.Retrieve):
     manager = Manager
     resource_name = 'basket'
     _relationships = (Relationship('testtesttest',
                                    relation='MissingObject'), )
Beispiel #2
0
 class MyResource(ResourceBase):
     pks = ('id', )
     _links = (Relationship('my_resource',
                            relation='MyResource',
                            templated=True,
                            embedded=True), )
Beispiel #3
0
 class LinkResource(ResourceBase):
     _links = [Relationship('first_link', relation='RelatedResource')]
Beispiel #4
0
 class LinkListResource(ResourceBase):
     _resource_name = 'link_list_resource'
     _links = {
         'link': Relationship('linked_list', relation='Related')
     }
Beispiel #5
0
 class RelationshipResource(ResourceBase):
     _resource_name = 'relationship_resource'
     _relationships = {
         'relationship': Relationship(property_map=dict(id='id'), relation='Related')
     }
Beispiel #6
0
 class Resource2(ResourceBase):
     _pks = ['id']
     _relationships = [Relationship('resource1', relation='Resource1')]
Beispiel #7
0
 class Resource(ResourceBase):
     _pks = ['id']
     _relationships = [
         Relationship('child', relation='Resource', embedded=True),
         Relationship('parent', relation='Resource')
     ]