bgneal@45: """ bgneal@45: Automatic admin definitions for the models in the news application. bgneal@45: bgneal@45: """ bgneal@45: from django.contrib import admin bgneal@45: from django.conf import settings bgneal@45: bgneal@45: from news.models import News bgneal@45: bgneal@45: bgneal@45: class NewsAdmin(admin.ModelAdmin): bgneal@45: list_filter = ['date'] bgneal@45: search_fields = ['title', 'content'] bgneal@45: save_on_top = True bgneal@45: bgneal@45: class Media: bgneal@45: js = settings.THIRD_PARTY_JS['tiny_mce'] bgneal@45: bgneal@45: admin.site.register(News, NewsAdmin)