File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -144,6 +144,15 @@ class PersonRelationship(ResourceRelationship):
144144 data_layer = {'session' : db .session ,
145145 'model' : Person }
146146
147+ class PersonTagList (ResourceList ):
148+ schema = PersonTagSchema
149+ data_layer = {'session' : db .session ,
150+ 'model' : Person_Tag }
151+
152+ class PersonTagDetail (ResourceDetail ):
153+ schema = PersonTagSchema
154+ data_layer = {'session' : db .session ,
155+ 'model' : Person_Tag }
147156
148157class ComputerList (ResourceList ):
149158 def query (self , view_kwargs ):
@@ -190,6 +199,9 @@ class ComputerRelationship(ResourceRelationship):
190199api .route (ComputerDetail , 'computer_detail' , '/computers/<int:id>' )
191200api .route (ComputerRelationship , 'computer_person' , '/computers/<int:id>/relationships/owner' )
192201
202+ api .route (PersonTagList , 'person_tag_list' , '/persontags' )
203+ api .route (PersonTagDetail , 'person_tag_detail' , '/persontags/<int:id>' )
204+
193205if __name__ == '__main__' :
194206 # Start application
195207 app .run (debug = True )
You can’t perform that action at this time.
0 commit comments