Skip to content
This repository has been archived by the owner on May 10, 2023. It is now read-only.

Support for adding tags through multi-part forms #26

Closed
jameskane05 opened this issue Dec 6, 2015 · 1 comment
Closed

Support for adding tags through multi-part forms #26

jameskane05 opened this issue Dec 6, 2015 · 1 comment

Comments

@jameskane05
Copy link

Using Django and Django Rest Framework connected to an Angular app, I'm trying to add tags to every WorkSample model I create. I create new instances of this model by submitting POST data to API endpoints. In this case, the model and form include a user-submitted image file, so I have to convert the POST data to a FormData object before POSTing so that DRF can interpret the image file (making sure to include parser_classes = ( FormParser, MultiPartParser,) in the model serializer to interpret a multi-part form).

That was working great before I added the tags field, using django-taggit and django-taggit-serializer. But trying to submit tag values through the FormData object results in this error: "{tags: ["Invalid json list. A tag list submitted in string form must be valid json."]}"

Is support for multi-part form submission an option? Wondering what I could do differently...

@glemmaPaul
Copy link
Owner

Hey @jameskane05, first of all thank you for creating the issue. Sorry for my utterly late response as I've been too busy to maintain and I should honestly see if I could get help from other people (there are people luckily interested)!

As I said in the issue #29 I'm going to push the new version towards renderers and parsers. So stay tuned (if you still need it offcourse haha)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants