Anyway I think the use and function of newforms has finally settled in my brain. Partly because I copied someones example a few months back and got it working though I didn't thoroughly understand it. Partly because I read thru the documentation for the 3rd time. And party because I read through the unit test code for newforms.
Any way my issue was that I was trying to clone an existing object. The breakthrough was realizing that I could call
form.save(commit=False)
so that I could intercept the resulting model instance and set the id = None before saving it so i didn't update the original object in anyway.I just may get the hang of this django thing one of these days...
No comments:
Post a Comment