Re: updating parent model on inline creation

2009-11-16 Thread Viktor
On nov. 14, 02:13, Preston Holmes wrote: > I'm setting up a conference website where a submission will have one > or more "reviews" > > I've got the reviews set as inlines for submissions in the admin > > The submission model has a "status" field that needs to go through > steps like "submitted" a

Re: updating parent model on inline creation

2009-11-13 Thread Preston Holmes
On Nov 13, 5:13 pm, Preston Holmes wrote: > if submission.status == "submitted" and submission.reviews.count > 0: > submission.status = "pending review" > > Are there even simpler ways to do this that I haven't thought of? answering myself - sorry: I should just put that logic in the review.

updating parent model on inline creation

2009-11-13 Thread Preston Holmes
I'm setting up a conference website where a submission will have one or more "reviews" I've got the reviews set as inlines for submissions in the admin The submission model has a "status" field that needs to go through steps like "submitted" and "pending review" What I'd like to do is when the f