sbrunner/c2c.sqlalchemy.rest — pull request #7 by asaunier (2013-10-30 19:07:21+00:00)
Title: New 'auto' view that updates an existing entry else creates it

This PR adds a new view named "auto" that gets the item id from the attributes (if missing a 400 error is returned), if an existing item matches it is updated with the provided values, else a new item is created. Request is submitted using POST method.

Example usage:
```
inventaire = REST(DBSession, Inventaire)

@view_config(route_name='inventaire_auto', renderer='jsonp')
def inventaire_auto(request):
return inventaire.auto(request)
```