Opened 12 years ago
Closed 12 years ago
#22227 closed Cleanup/optimization (wontfix)
save_model in ModelAdmin with "formsets" parameter
| Reported by: | anonymous | Owned by: | nobody |
|---|---|---|---|
| Component: | contrib.admin | Version: | 1.6 |
| Severity: | Normal | Keywords: | |
| Cc: | Davide Brunato | Triage Stage: | Unreviewed |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
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 , 12 years ago
| Cc: | added |
|---|---|
| Type: | Uncategorized → Cleanup/optimization |
comment:2 by , 12 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 passedformso you could accessform.instance. Adding additional arguments tosave_model()will be backwards incompatible for anyone overriding the method.