Is there any reason you can't create your own signal and put it in the rounds save() method and then just call the parents save?
http://docs.djangoproject.com/en/dev/topics/signals/#defining-and-sending-signals Cheers, Ryan On Jul 9, 6:12 am, Eugene Mirotin <emiro...@gmail.com> wrote: > Hello! > > I have a tricky (as seems to me :) problem. > > Consider I have 2 simply related models - a Game and a Round (with FK > to Game). Each has some generic fields like name and description. > Also, the Round has the ordering field (called number) (oh, I can > imagine your sighs =) > They are edited on the single admin page for Game with TabularInline > for game rounds. > > I know about the way to use jQuery for inlines reordering, but this is > not the question. Currently I am exactly interested in the manual > number field filling. > > So what happens when I save the game? First, the game itself is saved > because of the need of the saved FK object for rounds saving, and I > understand it. Then the rounds are saved in order. > At this point due to some reason the rounds' numbers might be any > numbers. But my applications requires them to be exactly the > consequent positive integers starting from 1. > > This could be easily fixed by a simple loop, but it should be done at > the appropriate point - on the per-game basis and _after_ all the > related objects are saved (otherwise nasty bugs with incorrect > ordering are possible). > > So I have to know the moment when all the current game's related > objects are saved. And there is no appropriate standard signal for > this. > Any thoughts? > > Gene --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@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=en -~----------~----~----~----~------~----~------~--~---