Use Cornice for REST API viws

still very experimental at this point
This commit is contained in:
Lance Edgar 2018-11-03 17:13:08 -05:00
parent 31ae5eacd5
commit ad35481234
5 changed files with 51 additions and 52 deletions

View file

@ -28,9 +28,12 @@ from __future__ import unicode_literals, absolute_import
from rattail.db import model
from cornice.resource import resource
from tailbone.api import APIMasterView
@resource(collection_path='/api/customers', path='/api/customer/{uuid}')
class CustomerView(APIMasterView):
model_class = model.Customer
@ -43,4 +46,4 @@ class CustomerView(APIMasterView):
def includeme(config):
CustomerView.defaults(config)
config.scan(__name__)