Hi Kenneth
Thanks for the guidance
I want to use the saved instance to create some other very similar 
instances.
The link looks like the way to go for me
Thanks
G

On Thursday, 13 November 2014 02:07:26 UTC+13, Kenneth Bolton wrote:
>
> Hi Graham,
>
> Could you explain the goal you are trying to accomplish? What do you want 
> to do with the instance? I believe in most cases, Django's signals (
> https://docs.djangoproject.com/en/dev/topics/signals/) are an easy way to 
> work with instances pre- or post-save.
>
> hth,
> ken
>
> On Wed, Nov 12, 2014 at 4:30 AM, Graham Oliver <[email protected] 
> <javascript:>> wrote:
>
>> I am trying to get the model instance when the save button is pressed on 
>> the Blog Admin form.
>> I have found the code (below) in \blog\admin.py that gets triggered for 
>> the save. 
>> However, I am not sure how to get the instance. 
>> I have looked at the types of 'self', 'request' and 'form' but they all 
>> seem to be classes (I am clearly missing something!)
>> Your help would be most welcome, Regards Graham
>>
>>     def save_form(self, request, form, change):
>>         """
>>         Super class ordering is important here - user must get saved 
>> first.
>>         """
>>         OwnableAdmin.save_form(self, request, form, change)
>>         return DisplayableAdmin.save_form(self, request, form, change)
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Mezzanine Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to