Re: Accessing child relations when overriding save()

2019-02-10 Thread Nick Emery
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

Re: Accessing child relations when overriding save()

2019-02-10 Thread Nick Emery
e: > >> 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 child is updated at the dat

Re: Accessing child relations when overriding save()

2019-02-10 Thread Nick Emery
e save() 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 solv

Accessing child relations when overriding save()

2019-02-10 Thread Nick Emery
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