Opened 11 years ago
Closed 11 years ago
#22227 closed Cleanup/optimization (wontfix)
save_model in ModelAdmin with "formsets" parameter
Description ¶
Can be useful to add a "formsets" parameter in the definition of the method ModelAdmin.save_model, passing it as argument in the save_model calls of add_view and change_view? This new parameter, that can be defaulted to "None" for backward compatibility, could be useful for model admin's customization when a calculated field depends from one or more formsets.
Change History (2)
comment:1 by , 11 years ago
Cc: | added |
---|---|
Type: | Uncategorized → Cleanup/optimization |
comment:2 by , 11 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Could you put the logic to update the instance in
save_formset()
instead? That's passedform
so you could accessform.instance
. Adding additional arguments tosave_model()
will be backwards incompatible for anyone overriding the method.