Permalink
Browse files

adds django admin search, columns, sorting, and filters

  • Loading branch information...
1 parent 024ddec commit f2eea98bf4fbef320a1fd4fecd7c16b7d2d378da mwcz committed May 14, 2011
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/photos/admin.py
View
@@ -9,6 +9,12 @@ class PhotoAdmin( admin.ModelAdmin ):
form = PhotoChangeForm
#date_hierarchy = 'post_date'
prepopulated_fields = { 'slug' : ( 'title',) }
+ list_display = ('title','published','mod_date','post_date',)
+ list_editable = ('published',)
+ list_filter = ('post_date','published',)
+ search_fields = ('title','caption','post_date','slug',)
+ save_on_top = True
+ ordering = ('-post_date',)
# copied from the UserAdmin in django/contrib/auth/admin.py
def get_form( self, request, obj=None, **kwargs ):

0 comments on commit f2eea98

Please sign in to comment.