Mercurial > public > madeira
diff madeira/articles/admin.py @ 47:0e51e5be34b9
For issue #4, create an articles application and import old data.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Tue, 20 Mar 2012 19:47:20 -0500 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/madeira/articles/admin.py Tue Mar 20 19:47:20 2012 -0500 @@ -0,0 +1,21 @@ +""" +Automatic admin definitions for the articles application. + +""" +from django.contrib import admin +from django.conf import settings + +from articles.models import Article + + +class ArticleAdmin(admin.ModelAdmin): + save_on_top = True + list_filter = ['date'] + list_display = ['title', 'date'] + search_fields = ['text', 'title'] + + class Media: + js = settings.THIRD_PARTY_JS['tiny_mce'] + + +admin.site.register(Article, ArticleAdmin)