Rajeesh,
I forgot to thank you for the inspiration for the patch I submitted,
so thanks!
For future reference, it is also possible to disable the delete button
by hard-coding the return value of "has_delete_permission" to False.
An example from my code:
class MenuAdmin(admin.ModelAdmin):
#
I was able to come up with a patch to solve the issue. With my patch,
by passing {'show_delete': False} in with extra_context in the
ModelAdmin change_view method, the delete button/icon is no longer
shown.
http://code.djangoproject.com/ticket/10057
On Sep 30, 1:40 pm, rajeesh wrote:
> Hi,
> I
Hi,
I think the problem lies in ModelAdmin.render_change_form. Watch out
the line of 'has_delete_permission'
It reads as..
'has_delete_permission': self.has_delete_permission(request, obj).
It just don't know anything about the context variable 'show_delete'.
Change the above line to ..
'has_de
In the "admin/submit_line.html" template I can see options such as
"show_delete_link", etc but cannot for the life of me figure out a
programmatic way to set these values to False. Ideally, I would only
like to display the "Save" button.
(I realize I could override the "change_form" template for
4 matches
Mail list logo