mirror of
https://github.com/django/django.git
synced 2025-10-26 15:16:09 +00:00
newforms-admin: Moved list_display_links from AdminOptions to ModelAdmin.
git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@4331 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -34,6 +34,7 @@ class ModelAdmin(object):
|
||||
"Encapsulates all admin options and functionality for a given model."
|
||||
|
||||
list_display = ('__str__',)
|
||||
list_display_links = ()
|
||||
list_filter = ()
|
||||
|
||||
def __init__(self, model):
|
||||
@@ -270,7 +271,7 @@ class ModelAdmin(object):
|
||||
if not self.has_change_permission(request, None):
|
||||
raise PermissionDenied
|
||||
try:
|
||||
cl = ChangeList(request, self.model, self.list_display, self.list_filter)
|
||||
cl = ChangeList(request, self.model, self.list_display, self.list_display_links, self.list_filter)
|
||||
except IncorrectLookupParameters:
|
||||
# Wacky lookup parameters were given, so redirect to the main
|
||||
# changelist page, without parameters, and pass an 'invalid=1'
|
||||
|
||||
Reference in New Issue
Block a user