ckridgway@16: """ ckridgway@16: Automatic admin definitions for the models in the reviews application. ckridgway@16: """ ckridgway@16: from django.contrib import admin bgneal@29: from django.conf import settings bgneal@29: ckridgway@16: from reviews.models import Review ckridgway@16: ckridgway@16: ckridgway@16: class ReviewAdmin(admin.ModelAdmin): ckridgway@34: list_filter = ['date'] ckridgway@34: search_fields = ['title', 'review', 'reviewer', 'review_site'] ckridgway@16: list_display = ['date', 'reviewer', 'review_site', 'title'] ckridgway@34: ordering = ['-date'] ckridgway@16: bgneal@29: class Media: bgneal@29: js = settings.THIRD_PARTY_JS['tiny_mce'] ckridgway@16: ckridgway@16: admin.site.register(Review, ReviewAdmin)