Django ModelAdmin.save_model() -vs- ModelAdmin.save_formset()
Posted
by anonymous coward
on Stack Overflow
See other posts from Stack Overflow
or by anonymous coward
Published on 2010-05-07T23:25:41Z
Indexed on
2010/05/07
23:38 UTC
Read the original article
Hit count: 204
django
|django-models
I want to ensure that a user editing a particular model is saved in that models updated_by
(FK User) field.
I'm using mostly ModelForms (not necessarily the built in Admin), and wondering:
In what cases would I need to override ModelAdmin.save_model()
or ModelAdmin.save_formset()
?
Or, is that doing it wrong? If it's just the models' save()
method that needs to be overridden, is there a proper way to access the request
object there?
© Stack Overflow or respective owner