I am trying to wrap up my first app using Django (specifically Django Rest
Framework which may change the save behavior), but have run into an issue
that I haven't been able to solve for about 10 hours now.
I am trying to override the save() method of a model to modify a field on a
bunch of chi
e() of the child?
>
> On Sun, 10 Feb, 2019, 7:04 PM Nick Emery
> wrote:
>
>> I am trying to wrap up my first app using Django (specifically Django
>> Rest Framework which may change the save behavior), but have run into an
>> issue that I haven't been able to
PM Shashank Singh wrote:
>
>> When do you create child objects??
>>
>> On Sun, 10 Feb, 2019, 9:17 PM Nick Emery > wrote:
>>
>>> Tried this too but save() never actually gets called on the child (it
>>> seems that the foreign key field of the ch
UPDATE: Finally figured it out! I ultimately did this by overriding
`perform_create()` in my [Django Rest Framework
view](https://www.django-rest-framework.org/api-guide/generic-views/) and
making my changes after saving the object.
On Sunday, February 10, 2019 at 8:34:44 AM UTC-5, Nick Emery
4 matches
Mail list logo