Mercurial > public > sg101
view gpp/news/admin.py @ 102:e67c4dd98db5
Forums: new topic form sprouts boolean fields for sticky and locking if the user has rights. Implemented the locked logic. Fixed a bug where topics where getting out of order (the view_count was bumping the update_date because of auto_now).
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Wed, 16 Sep 2009 02:01:57 +0000 |
parents | ca66189c7c44 |
children | b4305e18d3af |
line wrap: on
line source
""" This file contains the automatic admin site definitions for the News models. """ from django.contrib import admin from django.conf import settings 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 = settings.GPP_THIRD_PARTY_JS['tiny_mce'] 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 = settings.GPP_THIRD_PARTY_JS['tiny_mce'] admin.site.register(Category) admin.site.register(Story, StoryAdmin) admin.site.register(PendingStory, PendingStoryAdmin)