Re: working ImageField upload example

2016-08-23 Thread Andrew Backer
Greg, Yes, file uploading doesn't work in JSON. It is theoretically possible, but don't try :D Multipart works fine here, and we have many several ViewSets and Views that receive images. We haven't even customized anything except by adding a function to de-nest the json values (e.g. user

Re: working ImageField upload example

2016-08-23 Thread Jeff Tchang
Here is what I have inside viewsets.py from rest_framework.parsers import MultiPartParser, FormParser, FileUploadParser class CustomMultiPartParser(MultiPartParser): media_type = 'multipart/*' class PictureViewSet(viewsets.ModelViewSet): queryset = Picture.objects.all().order_by('-crea

working ImageField upload example

2016-08-23 Thread ggilley
I'm ready to tear my hair out. I've been searching and searching for a working example of uploading to django using rest apis. I've looked at a lot of examples I've found searching, but none of them seem to work. Do multipart forms work in the current version? I never get any of the parameters

Re: Curl PUT Request With JWT Authorization Header

2016-08-23 Thread 'voger' via Django REST framework
BTW the error you get it doesn't have to do with the authorization. It says that it can't resolve the url. Is the url you posted the actual url that you are trying? It doesn't seem right. On 23/08/2016 09:06 μμ, 'voger' via Django REST framework wrote: Personally I prefer "postman rest client

Re: Curl PUT Request With JWT Authorization Header

2016-08-23 Thread 'voger' via Django REST framework
Personally I prefer "postman rest client". Much less trouble bout since you insist going CLI here is the notes file from codingforentrepreneurs.com course on django Rest Framework. They have it open in github and I think this particular line might interest you. https://github.com/codingforen

3.4.6 Release

2016-08-23 Thread Tom Christie
3.4.6 has now been released. Includes a few more bugfixes, including a regression in the browsable API. Release notes available here: http://www.django-rest-framework.org/topics/release-notes/#34x-series -- You received this message because you are subscribed to the Google Groups "Django REST

Re: Curl PUT Request With JWT Authorization Header

2016-08-23 Thread Peter Boyles
Hi Andrew, I tried that call and got this strange message: HTTP/1.1 500 INTERNAL SERVER ERROR Connection: keep-alive Content-Type: text/html Date: Tue, 23 Aug 2016 13:15:20 GMT Server: gunicorn/19.6.0 Transfer-Encoding: chunked Vary: Cookie Via: 1.1 vegur X-Frame-Options: SAMEORIGIN http: error