Open markfinger opened 7 years ago
The endpoint should accept have read and write access.
@jmurty I've added the MediaCategory to the API on feature/media-category-api
. Most of the test suite that was ported from the Image API is passing, but there's a failure associated with permissions...
https://travis-ci.org/ic-labs/django-icekit/builds/242293764#L1558
@markfinger The 247-image-categories-in-api
branch has updated M2M write support and uses it to make the Image API's categories
field writable to assign existing or create new MediaCategory
items directly in the Image API endpoint.
See the new tests at the bottom of icekit/api/images/tests.py for example usage: the way you have to specify multipart form field names is fiddly.
Use case is assigning categories when uploading images.
We'll need:
id
exposed so we can reference it when adding relationsname
exposed so we can match for get/creates before assigning relations