Mercurial > public > sg101
view gpp/news/admin.py @ 3:33f73b7bd305
Adjusted weblinks link template. Use an icon for reporting broken link.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 11 Apr 2009 18:28:13 +0000 |
parents | dbd703f7d63a |
children | ca66189c7c44 |
line wrap: on
line source
""" This file contains the automatic admin site definitions for the News models. """ from django.contrib import admin from news.models import PendingStory from news.models import Story from news.models import Category class PendingStoryAdmin(admin.ModelAdmin): list_display = ('title', 'date_submitted', 'submitter') list_filter = ('date_submitted', ) search_fields = ('title', 'short_text', 'long_text') date_hierarchy = 'date_submitted' class Media: js = ('js/tiny_mce/tiny_mce.js', 'js/tiny_mce_init_admin.js') class StoryAdmin(admin.ModelAdmin): list_display = ('title', 'date_published', 'submitter', 'category') list_filter = ('date_published', 'category') search_fields = ('title', 'short_text', 'long_text') date_hierarchy = 'date_published' class Media: js = ('js/tiny_mce/tiny_mce.js', 'js/tiny_mce_init_admin.js') admin.site.register(Category) admin.site.register(Story, StoryAdmin) admin.site.register(PendingStory, PendingStoryAdmin)