spiral-project / daybed

Form validation and data storage API
http://daybed.rtfd.org/
BSD 3-Clause "New" or "Revised" License
53 stars 8 forks source link

Add definition PUT, that would create/update models #231

Closed leplatrem closed 9 years ago

leplatrem commented 9 years ago

Would allow JS libs to fetch/save on the same URL

Natim commented 9 years ago

This? https://github.com/spiral-project/daybed/blob/master/daybed/views/models.py#L182-L198

leplatrem commented 9 years ago

Nope, on /model/<modelid>/definition, with the definition only in body

Natim commented 9 years ago

I am not sure we want this because we are already giving the definition only on the /model/<model_id> endpoint: http://daybed.readthedocs.org/en/latest/usage.html#model-management

leplatrem commented 9 years ago

But the permissions set required is different, that's one of the reasons we should allow definition PUT. (e.g. I can have read_definition and update_definition, but not delete_model ... )