django-shapeshifter: A CBV to handle multiple forms in one view
github.com/kennethlove/django-shapeshifterPosted Aug 29, 2018, 5:36 AM UTC
324
Posted Aug 29, 2018, 5:36 AM UTC
Cool stuff! My approach to handling this problem in the past was using Ajax (or Intercooler.js) to submit the forms to separate endpoints for each.
This is cool! I've used the same snippet of code I found on some forum years ago every time I need to do this but it isn't nearly as clean as this.
Support for multi-form class based views really should be in django core.
The use case of User/Profile models is really well complimented in this library. It's kind of annoying to have to cut the data coming from a form in half in the service to write it separately in two different models. Great job!
That is awesome! I found myself implementing this kind of functionality quite often. But the I find two use cases that don't seem to be covered: