comparison news/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/news/admin.py@966cde8635c0
children
comparison
equal deleted inserted replaced
70:f26cdda0ad8b 71:e2868ad47a1e
1 """
2 Automatic admin definitions for the models in the news application.
3
4 """
5 from django.contrib import admin
6 from django.conf import settings
7
8 from news.models import News
9
10
11 class NewsAdmin(admin.ModelAdmin):
12 list_filter = ['date']
13 search_fields = ['title', 'content']
14 save_on_top = True
15
16 class Media:
17 js = settings.THIRD_PARTY_JS['tiny_mce']
18
19 admin.site.register(News, NewsAdmin)