Opened 18 years ago
Closed 17 years ago
#3522 closed (duplicate)
[newforms-admin] global name '_get_deleted_objects' is not defined
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | contrib.admin | Version: | dev |
Severity: | Keywords: | newforms-admin _get_deleted_objects | |
Cc: | Triage Stage: | Design decision needed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Under the newforms-admin branch, deleting an object through the admin results in the following error:
Request Method: GET
Request URL: http://djangotest/admin/sandbox/book/2/delete/
Exception Type: NameError
Exception Value: global name '_get_deleted_objects' is not defined
Exception Location: /usr/lib/python2.4/site-packages/django/contrib/admin/options.py in delete_view, line 466
models.py: from django.db import models # Create your models here. class Book(models.Model): name = models.CharField(maxlength=100) class Admin: pass
Attachments (2)
Change History (10)
comment:1 by , 18 years ago
Keywords: | _get_deleted_objects added; _get_deleted_objects' removed |
---|
comment:2 by , 18 years ago
Triage Stage: | Unreviewed → Accepted |
---|
by , 18 years ago
Attachment: | deleted_objects_fix.diff added |
---|
comment:3 by , 18 years ago
Has patch: | set |
---|
comment:4 by , 18 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
comment:5 by , 18 years ago
Summary: | newforms-admin: global name '_get_deleted_objects' is not defined → [newforms-admin] global name '_get_deleted_objects' is not defined |
---|
Fixing title so that searches are easier.
comment:6 by , 18 years ago
Triage Stage: | Ready for checkin → Design decision needed |
---|
Since the whole _get_deleted_objects() function is only for internal use and is only called by itself and the admin delete view, it's probably better to move the whole function into the place where it's used.
I'm not going to apply this one for the time being. Adrian can decide how he wants to break up the code.
by , 17 years ago
Attachment: | deleted_objects_fix2.diff added |
---|
comment:7 by , 17 years ago
Well, first patch don't work anymore (because circular dependencies), so the only left option is to move whole _get_deleted_objects() function into the place where it's used. I attached patch, which do that.
Please try to fix this asap, because whole delete view don't work because of this.
The attached patch fixes the bug. It's against the newforms-admin branch.