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

@ -30,9 +30,12 @@ import six
from rattail.db import model
from cornice.resource import resource
from tailbone.api import APIMasterView
@resource(collection_path='/api/users', path='/api/users/{uuid}')
class UserView(APIMasterView):
model_class = model.User
@ -45,4 +48,4 @@ class UserView(APIMasterView):
def includeme(config):
UserView.defaults(config)
config.scan(__name__)