1
0
mirror of https://github.com/django/django.git synced 2025-10-26 23:26:08 +00:00

newforms-admin: Moved list_select_related from AdminOptions to ModelAdmin.

git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@4335 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty
2007-01-16 00:51:22 +00:00
parent c9e4b37290
commit 93e024365d
4 changed files with 7 additions and 6 deletions

View File

@@ -36,6 +36,7 @@ class ModelAdmin(object):
list_display = ('__str__',)
list_display_links = ()
list_filter = ()
list_select_related = False
search_fields = ()
date_hierarchy = None
save_as = False
@@ -275,7 +276,7 @@ class ModelAdmin(object):
raise PermissionDenied
try:
cl = ChangeList(request, self.model, self.list_display, self.list_display_links, self.list_filter,
self.date_hierarchy, self.search_fields)
self.date_hierarchy, self.search_fields, self.list_select_related)
except IncorrectLookupParameters:
# Wacky lookup parameters were given, so redirect to the main
# changelist page, without parameters, and pass an 'invalid=1'