On 15-7-2012 0:49, Nicolas Emiliani wrote:
> obj.published == True
> 
> Is there a way to know which was the state of the model, in this case the
> state of obj.published,
> before the user clicked on the save button on the admin form ?

Set the form field of the ModelAdmin to a custom form that derives
forms.ModelForm. Add a BooleanField to this custom form with a
HiddenInput widget. Populate that field in ModelAdmin.get_form().
Some wrestling with formfield_overrides may be necessary.
-- 
Melvyn Sopacua

-- 
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.

Reply via email to