mirror of
https://github.com/django/django.git
synced 2025-10-26 15:16:09 +00:00
newforms-admin: Changed list_filter implementation to use ModelAdmin instead of AdminOptions. Also removed list_filter and list_display from AdminOptions entirely.
git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@4330 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_filter = ()
|
||||
|
||||
def __init__(self, model):
|
||||
self.model = model
|
||||
@@ -269,7 +270,7 @@ class ModelAdmin(object):
|
||||
if not self.has_change_permission(request, None):
|
||||
raise PermissionDenied
|
||||
try:
|
||||
cl = ChangeList(request, self.model, self.list_display)
|
||||
cl = ChangeList(request, self.model, self.list_display, 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