Access to refering objects befor save

15 views
Skip to first unread message

scaphilo

unread,
Jan 17, 2013, 12:23:35 AM1/17/13
to django...@googlegroups.com
Hi

I would like to overwrite the save_model function of a model. During this save i need to have access to some refering models wich are also newly created with (admin.TabularInline).

The post save method of accessing these would be:

allReferingObjects = ReferingModel.objects.filter(refereTo=referedModel.id)

of cause the referedModel.id  does not exist because the model is not stored in database yet

the post_save signal will provide all required functionality because i need to give the user a feedback if something went wrong

thanks for help

scaphilo

unread,
Jan 17, 2013, 12:57:45 AM1/17/13
to django...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages