mirror of
https://github.com/django/django.git
synced 2025-10-26 07:06:08 +00:00
Fixed #19536 -- Included object-tools when ModelAdmin.has_add_permission() is False.
This commit is contained in:
committed by
Tim Graham
parent
d9e150b311
commit
ff19df9c2d
@@ -22,6 +22,9 @@ class EventAdmin(admin.ModelAdmin):
|
||||
def event_date_func(self, event):
|
||||
return event.date
|
||||
|
||||
def has_add_permission(self, request):
|
||||
return False
|
||||
|
||||
site.register(Event, EventAdmin)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user