Code

Ticket #7329: admin_classes.diff

File admin_classes.diff, 1.1 KB (added by benspaulding, 6 years ago)

Patch to add list_display option to flatpage and redirect Admin classes.

Line 
1Index: django/contrib/flatpages/models.py
2===================================================================
3--- django/contrib/flatpages/models.py  (revision 7555)
4+++ django/contrib/flatpages/models.py  (working copy)
5@@ -26,7 +26,8 @@
6             (None, {'fields': ('url', 'title', 'content', 'sites')}),
7             (_('Advanced options'), {'classes': 'collapse', 'fields': ('enable_comments', 'registration_required', 'template_name')}),
8         )
9-        list_filter = ('sites',)
10+        list_display = ('url', 'title')
11+        list_filter = ('sites', 'enable_comments', 'registration_required')
12         search_fields = ('url', 'title')
13 
14     def __unicode__(self):
15Index: django/contrib/redirects/models.py
16===================================================================
17--- django/contrib/redirects/models.py  (revision 7555)
18+++ django/contrib/redirects/models.py  (working copy)
19@@ -17,6 +17,7 @@
20         ordering = ('old_path',)
21 
22     class Admin:
23+        list_display = ('old_path', 'new_path')
24         list_filter = ('site',)
25         search_fields = ('old_path', 'new_path')