Hacker News new | past | comments | ask | show | jobs | submit login

An issue that I've consistently run into is being able to write to related models. I can serialize them just fine, but without being able to write, it forces users to come up with nasty work arounds. To be fair, I hate having to write resources that handle writing nested objects, but there are some many front end use cases where multiple writes is not ideal.



Oh right, writable nested serializations, sure. I won't rehash the reasons that we don't support that in core (ill defined what behavior the user should expect) but yeah it'd still be good to have a third party package that does a decent "best effort" job of that.

My personal take on this is forget about "shitty hacks" or trying to handle this automatically, and just write the serializer create and update methods explicitly.


I know why it's not supported and I agree that there should be a third party package for it that is more or less officially supported/recommended like the jwt package.

Most recently I created a new handler object that runs some introspection of the model. I then override my model view sets' create and update methods to implement the handler. Maybe I should get off my ass and open source it (currently buried in a project).




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: