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 first review is created via the
inline, update the status on the parent submission model.

I thought of two ways to do this.

The first more complicated way would be to right my own view for this
with subclassed formset handling that would do this.

The second idea which I now am liking better should also work:

register a funciton for post_save signals on the submission model, and
then (in pseudo code)

if submission.status == "submitted" and submission.reviews.count > 0:
submission.status = "pending review"

If this were a busy site - the signal based system might be heavy on
the database, but this is a project where we will never see real load.

Are there even simpler ways to do this that I haven't thought of?

-Preston

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=.


Reply via email to