I just looked over your model again. Your save() override has a
super(Screens,...) reference, which doesn't match the model class.

That may explain why you are getting the invalid parameters error, since
you are probably calling the wrong save function from a different class.

I'd remove that save() override entirely.

-James
Just to add, if I use a curl request

curl -H  "Authorization: Bearer $usertoken" -H "Content-Type:
application/json" -X POST -d
'{"user":"foo1","stock":"XYZ","prefs":"Likes"}' http://${endpoint}/addPrefs

I get a error: {"prefs":["\"Likes\" is not a valid choice."]}

If I use

curl -H  "Authorization: Bearer $usertoken" -H "Content-Type:
application/json" -X POST -d '{"user":"foo1","stock":"XYZ","prefs":"1"}'
http://${endpoint}/addPrefs

I get the above trace.

 --
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/7ca2a02f-596e-40da-9a16-2b2011871e02%40googlegroups.com
<https://groups.google.com/d/msgid/django-users/7ca2a02f-596e-40da-9a16-2b2011871e02%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2Be%2BciVMY4FmpfrSoZEG8njPj%2B%3DJiTjMSAPK9YXPCyXUQyiJGA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to