Show note field, update filterable.

This commit is contained in:
cahrens
2013-07-08 16:55:32 -04:00
parent 73f4b1c676
commit 23ffa2a616

View File

@@ -12,8 +12,8 @@ class CourseCreatorAdmin(admin.ModelAdmin):
"""
# Fields to display on the overview page.
list_display = ('username', 'email', 'state', 'state_changed')
readonly_fields = ('username', 'email', 'state_changed')
list_display = ['username', 'email', 'state', 'state_changed', 'note']
readonly_fields = ['username', 'email', 'state_changed']
# Controls the order on the edit form (without this, read-only fields appear at the end).
fieldsets = (
(None, {
@@ -21,10 +21,10 @@ class CourseCreatorAdmin(admin.ModelAdmin):
}),
)
# Fields that filtering support
list_filter = list_display
list_filter = ['state', 'state_changed']
# Fields that search supports. Note that the search term for state has to be
# its key (ie, 'g' instead of 'granted').
search_fields = ['username', 'email', 'state']
search_fields = ['username', 'email', 'state', 'note']
# Turn off the action bar (we have no bulk actions)
actions = None