Opened 6 years ago

Closed 6 years ago

#29715 closed Uncategorized (invalid)

Djagno ModelAdmin Pre Delete view page crash in NestedObjects.collect() method

Reported by: Pavel Sirotkin Owned by: nobody
Component: contrib.admin Version: 1.11
Severity: Normal Keywords: question, admin, delete
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Hello, I have some question about pre-delete ModelAdmin view. In my database I have proxy table (postgress feature) without id column call it ProxyBigTable. Some elements in another tables linked to this ProxyBigTable, and when I want delete some objects which have connect with ProxyBigTable from my standart Django admin interface (click button delete or action Delete this objects) I get crash, when start working NestedObjects.collect() method because it build all relations which deleting from my tables. I have solution add to models who linked to ProxyBigTable some custom list value where I counting what objects I do not want to see in pre-delete view. And I override class Collector and NestedObjects for this, also override _delete_view() method for ModelAdmin. I not find another, more light solution, maybe you know some another way?

P.S. Sorry for my English

Change History (1)

comment:1 by Tim Graham, 6 years ago

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.
Back to Top