[Django] #18491: When deleting a proxy model, the admin does not show warning about cascade delete for object with foreign key on the proxied model

25 views
Skip to first unread message

Django

unread,
Jun 20, 2012, 6:53:02 AM6/20/12
to django-...@googlegroups.com
#18491: When deleting a proxy model, the admin does not show warning about cascade
delete for object with foreign key on the proxied model
-------------------------------+--------------------
Reporter: bdauvergne@… | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 1.4
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------
Suppose this

{{{
class A(Model):
pass

class ProxyA(A):
class Meta:
proxy = True

class B(Model):
a = ForeignKey(A)
}}}

If you expose ProxyA in the admin/ and try to delete an instance which has
linked B objects, there will be no warning about the cascading delete.

--
Ticket URL: <https://code.djangoproject.com/ticket/18491>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jul 15, 2012, 4:50:24 PM7/15/12
to django-...@googlegroups.com
#18491: When deleting a proxy model, the admin does not show warning about cascade
delete for object with foreign key on the proxied model
-------------------------------+--------------------------------------
Reporter: bdauvergne@… | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 1.4
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by aaugustin):

* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0


Comment:

Here's the history of bugs related to deletion of proxy models: #18083,
#16128, #12208, #11116.

--
Ticket URL: <https://code.djangoproject.com/ticket/18491#comment:1>

Django

unread,
Jul 15, 2012, 4:56:11 PM7/15/12
to django-...@googlegroups.com
#18491: When deleting a proxy model, the admin does not show warning about cascade
delete for object with foreign key on the proxied model
-------------------------------+------------------------------------
Reporter: bdauvergne@… | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 1.4
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------
Changes (by akaariai):

* stage: Unreviewed => Accepted


Comment:

I have verified this in HEAD.

--
Ticket URL: <https://code.djangoproject.com/ticket/18491#comment:2>

Django

unread,
Feb 23, 2013, 9:15:36 AM2/23/13
to django-...@googlegroups.com
#18491: When deleting a proxy model, the admin does not show warning about cascade
delete for object with foreign key on the proxied model
-------------------------------+-----------------------------------------
Reporter: bdauvergne@… | Owner: gszczepanczyk
Type: Bug | Status: assigned
Component: contrib.admin | Version: 1.4

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------+-----------------------------------------
Changes (by gszczepanczyk):

* owner: nobody => gszczepanczyk
* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/18491#comment:3>

Django

unread,
Feb 23, 2013, 10:49:06 AM2/23/13
to django-...@googlegroups.com
#18491: When deleting a proxy model, the admin does not show warning about cascade
delete for object with foreign key on the proxied model
-------------------------------+-----------------------------------------
Reporter: bdauvergne@… | Owner: gszczepanczyk
Type: Bug | Status: assigned
Component: contrib.admin | Version: 1.4

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------+-----------------------------------------
Changes (by gszczepanczyk):

* has_patch: 0 => 1


Comment:

I have added pull request with fix:
https://github.com/django/django/pull/774

--
Ticket URL: <https://code.djangoproject.com/ticket/18491#comment:4>

Django

unread,
Feb 23, 2013, 11:20:23 AM2/23/13
to django-...@googlegroups.com
#18491: When deleting a proxy model, the admin does not show warning about cascade
delete for object with foreign key on the proxied model
-------------------------------------+-------------------------------------
Reporter: bdauvergne@… | Owner:
Type: Bug | gszczepanczyk
Component: contrib.admin | Status: assigned
Severity: Normal | Version: 1.4
Keywords: | Resolution:
Has patch: 1 | Triage Stage: Ready for
Needs tests: 0 | checkin
Easy pickings: 0 | Needs documentation: 0
| Patch needs improvement: 0
| UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by chomik):

* stage: Accepted => Ready for checkin


Comment:

PR 774 seems ok for me.

--
Ticket URL: <https://code.djangoproject.com/ticket/18491#comment:5>

Django

unread,
Feb 23, 2013, 1:40:48 PM2/23/13
to django-...@googlegroups.com
#18491: When deleting a proxy model, the admin does not show warning about cascade
delete for object with foreign key on the proxied model
-------------------------------------+-------------------------------------
Reporter: bdauvergne@… | Owner:
Type: Bug | gszczepanczyk
Component: contrib.admin | Status: assigned
Severity: Normal | Version: 1.4
Keywords: | Resolution:
Has patch: 1 | Triage Stage: Ready for
Needs tests: 0 | checkin
Easy pickings: 0 | Needs documentation: 0
| Patch needs improvement: 0
| UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by gszczepanczyk):

I have pushed recommended solution.

--
Ticket URL: <https://code.djangoproject.com/ticket/18491#comment:6>

Django

unread,
Feb 23, 2013, 5:21:35 PM2/23/13
to django-...@googlegroups.com
#18491: When deleting a proxy model, the admin does not show warning about cascade
delete for object with foreign key on the proxied model
-------------------------------------+-------------------------------------
Reporter: bdauvergne@… | Owner:
Type: Bug | gszczepanczyk
Component: contrib.admin | Status: closed
Severity: Normal | Version: 1.4
Keywords: | Resolution: fixed

Has patch: 1 | Triage Stage: Ready for
Needs tests: 0 | checkin
Easy pickings: 0 | Needs documentation: 0
| Patch needs improvement: 0
| UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Honza Kral <honza.kral@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"2b48fcc607010065c0f8107baf669dd41b164f3c"]:
{{{
#!CommitTicketReference repository=""
revision="2b48fcc607010065c0f8107baf669dd41b164f3c"
Fixed #18491 -- deleting a proxy doesn't show warning about cascade
deletes
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/18491#comment:7>

Django

unread,
Aug 14, 2013, 9:40:12 AM8/14/13
to django-...@googlegroups.com
#18491: When deleting a proxy model, the admin does not show warning about cascade
delete for object with foreign key on the proxied model
-------------------------------------+-------------------------------------
Reporter: bdauvergne@… | Owner:
Type: Bug | gszczepanczyk
Component: contrib.admin | Status: closed
Severity: Normal | Version: 1.4
Keywords: | Resolution: fixed
Has patch: 1 | Triage Stage: Ready for
Needs tests: 0 | checkin
Easy pickings: 0 | Needs documentation: 0
| Patch needs improvement: 0
| UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by timo):

Fixing this seems to have introduced another regression, see #20777. We
may revert this fix if we can't come up with a solution for that.

--
Ticket URL: <https://code.djangoproject.com/ticket/18491#comment:8>

Django

unread,
Aug 16, 2013, 7:59:40 AM8/16/13
to django-...@googlegroups.com
#18491: When deleting a proxy model, the admin does not show warning about cascade
delete for object with foreign key on the proxied model
-------------------------------------+-------------------------------------
Reporter: bdauvergne@… | Owner:
Type: Bug | gszczepanczyk
Component: contrib.admin | Status: closed
Severity: Normal | Version: 1.4
Keywords: | Resolution: fixed
Has patch: 1 | Triage Stage: Ready for
Needs tests: 0 | checkin
Easy pickings: 0 | Needs documentation: 0
| Patch needs improvement: 0
| UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"c769c266017c9a527444f8f026c7a76b394d0412"]:
{{{
#!CommitTicketReference repository=""
revision="c769c266017c9a527444f8f026c7a76b394d0412"
[1.6.x] Revert "Fixed #18491 -- deleting a proxy doesn't show warning
about cascade deletes"

This reverts commit 2b48fcc607010065c0f8107baf669dd41b164f3c.

It introduced a regression (#20777) which we can't easily fix in 1.6.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/18491#comment:9>

Django

unread,
Aug 16, 2013, 8:03:11 AM8/16/13
to django-...@googlegroups.com
#18491: When deleting a proxy model, the admin does not show warning about cascade
delete for object with foreign key on the proxied model
-------------------------------------+-------------------------------------
Reporter: bdauvergne@… | Owner:
Type: Bug | gszczepanczyk
Component: contrib.admin | Status: closed
Severity: Normal | Version: 1.4
Keywords: | Resolution: fixed
Has patch: 1 | Triage Stage: Ready for
Needs tests: 0 | checkin
Easy pickings: 0 | Needs documentation: 0
| Patch needs improvement: 0
| UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by timo):

Fix has been reverted in 1.6.x, but will remain in master and removed (but
fixed via a new change) in https://github.com/django/django/pull/1478

--
Ticket URL: <https://code.djangoproject.com/ticket/18491#comment:10>

Django

unread,
Aug 19, 2013, 3:00:33 AM8/19/13
to django-...@googlegroups.com
#18491: When deleting a proxy model, the admin does not show warning about cascade
delete for object with foreign key on the proxied model
-------------------------------------+-------------------------------------
Reporter: bdauvergne@… | Owner:
Type: Bug | gszczepanczyk
Component: contrib.admin | Status: closed
Severity: Normal | Version: 1.4
Keywords: | Resolution: fixed
Has patch: 1 | Triage Stage: Ready for
Needs tests: 0 | checkin
Easy pickings: 0 | Needs documentation: 0
| Patch needs improvement: 0
| UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by akaariai):

Fixed again in 3844089edc43ff29aab5bac82a0eecab23d8d14a - the fix isn't in
1.6.x, only master.

--
Ticket URL: <https://code.djangoproject.com/ticket/18491#comment:11>

Reply all
Reply to author
Forward
0 new messages