comparison articles/admin.py @ 71:e2868ad47a1e

For Django 1.4, using the new manage.py.
author Brian Neal <bgneal@gmail.com>
date Sat, 14 Apr 2012 16:40:29 -0500
parents madeira/articles/admin.py@0e51e5be34b9
children
comparison
equal deleted inserted replaced
70:f26cdda0ad8b 71:e2868ad47a1e
1 """
2 Automatic admin definitions for the articles application.
3
4 """
5 from django.contrib import admin
6 from django.conf import settings
7
8 from articles.models import Article
9
10
11 class ArticleAdmin(admin.ModelAdmin):
12 save_on_top = True
13 list_filter = ['date']
14 list_display = ['title', 'date']
15 search_fields = ['text', 'title']
16
17 class Media:
18 js = settings.THIRD_PARTY_JS['tiny_mce']
19
20
21 admin.site.register(Article, ArticleAdmin)