Opened 14 years ago
Closed 12 years ago
#13900 closed New feature (wontfix)
New admin feature: Delete and replace with existing object
Reported by: | Riccardo Di Virgilio | Owned by: | nobody |
---|---|---|---|
Component: | contrib.admin | Version: | dev |
Severity: | Normal | Keywords: | admin, delete_view |
Cc: | Triage Stage: | Design decision needed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | yes |
Description
i would like to edit django.contrib.admin.options.ModelAdmin.delete_view and add a helpful feature.
Instead of deleting all the nested objects, the delete_view could handle 3 options:
- delete all the related objects (current option)
- where the foreign key to the current instance is nullable, null or delete
- replace all the related objects with an other model instance (we can make a user choose it with a forms.ModelChoiceField)
i really would like to contribute to this feature, because i need to do this in my admin site, but i'm new, so please help me :)
bye bye
about me:
i'm riccardo di virgilio, i have programmed sprint24.com with django. i have learn a lot of things and i think i'm ready to contribute.
Change History (8)
comment:1 by , 14 years ago
Component: | Uncategorized → django.contrib.admin |
---|---|
Keywords: | admin delete_view added |
Version: | 1.2 → SVN |
comment:2 by , 14 years ago
Update from the mailinglist:
The idea is to provide some hooks in the ModelAdmin
class that can be overwritten in subclasses to inject special behaviour for the delete view. So that no visual or semantical change is made to the delete_view by default but that its easier to provide your own logic.
Discussion: http://groups.google.com/group/django-developers/browse_thread/thread/42f629f324a5177f
comment:3 by , 14 years ago
This seems to essentially be a merge function. I've got something similar here although it could certainly be made easier.
comment:5 by , 14 years ago
Severity: | → Normal |
---|---|
Type: | → New feature |
comment:6 by , 13 years ago
UI/UX: | set |
---|
comment:7 by , 13 years ago
Easy pickings: | unset |
---|---|
Summary: | New admin feature: Delete and replace with existing ocject → New admin feature: Delete and replace with existing object |
comment:8 by , 12 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Since the reporter apparently lost interest after the mailing list discussion retargeted his proposal, and since there isn't a lot of demand, I'm going to close this ticket.
Feel free to reopen with a patch.
Hi riccardo,
thank you for your idea - personally I find this interesting and useful. But after all its a change that needs discussion before someone invests too much time for a feature that isn't going to be integrated. So you might want to kick of a discussion in the django-developers mailing list. Go to http://groups.google.com/group/django-developers and explain to the audience what you want todo and if they agree on its usefullness.
Gregor