magic-removal: Merged to [1973]
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1974 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
974316939a
commit
6e664fe071
1
AUTHORS
1
AUTHORS
|
@ -79,6 +79,7 @@ answer newbie questions, and generally made Django that much better:
|
|||
Robin Munn <http://www.geekforgod.com/>
|
||||
Nebojša Dorđević
|
||||
Sam Newman <http://www.magpiebrain.com/>
|
||||
oggie rob <oz.robharvey@gmail.com>
|
||||
pgross@thoughtworks.com
|
||||
phaedo <http://phaedo.cx/>
|
||||
Luke Plant <http://lukeplant.me.uk/>
|
||||
|
|
|
@ -61,7 +61,7 @@ def _get_deleted_objects(deleted_objects, perms_needed, user, obj, opts, current
|
|||
else:
|
||||
# Display a link to the admin page.
|
||||
nh(deleted_objects, current_depth, ['%s: <a href="../../../../%s/%s/%s/">%s</a>' % \
|
||||
(capfirst(related.opts.verbose_name), related.opts.app_label, related.opts.module_name, sub_obj.id, strip_tags(str(sub_obj))), []])
|
||||
(capfirst(related.opts.verbose_name), related.opts.app_label, related.opts.module_name, getattr(sub_obj, related.opts.pk.attname), strip_tags(str(sub_obj))), []])
|
||||
_get_deleted_objects(deleted_objects, perms_needed, user, sub_obj, related.opts, current_depth+2)
|
||||
# If there were related objects, and the user doesn't have
|
||||
# permission to delete them, add the missing perm to perms_needed.
|
||||
|
@ -87,7 +87,7 @@ def _get_deleted_objects(deleted_objects, perms_needed, user, obj, opts, current
|
|||
nh(deleted_objects, current_depth, [
|
||||
(_('One or more %(fieldname)s in %(name)s:') % {'fieldname': related.field.name, 'name':related.opts.verbose_name}) + \
|
||||
(' <a href="../../../../%s/%s/%s/">%s</a>' % \
|
||||
(related.opts.app_label, related.opts.module_name, sub_obj.id, strip_tags(str(sub_obj)))), []])
|
||||
(related.opts.app_label, related.opts.module_name, getattr(sub_obj, related.opts.pk.attname), strip_tags(str(sub_obj)))), []])
|
||||
# If there were related objects, and the user doesn't have
|
||||
# permission to change them, add the missing perm to perms_needed.
|
||||
if related.opts.admin and has_related_objs:
|
||||
|
|
Loading…
Reference in New Issue