annotate gpp/news/admin.py @ 1:dbd703f7d63a
Initial import of sg101 stuff from private repository.
author |
gremmie |
date |
Mon, 06 Apr 2009 02:43:12 +0000 |
parents |
|
children |
ca66189c7c44 |
rev |
line source |
gremmie@1
|
1 """
|
gremmie@1
|
2 This file contains the automatic admin site definitions for the News models.
|
gremmie@1
|
3 """
|
gremmie@1
|
4
|
gremmie@1
|
5 from django.contrib import admin
|
gremmie@1
|
6 from news.models import PendingStory
|
gremmie@1
|
7 from news.models import Story
|
gremmie@1
|
8 from news.models import Category
|
gremmie@1
|
9
|
gremmie@1
|
10 class PendingStoryAdmin(admin.ModelAdmin):
|
gremmie@1
|
11 list_display = ('title', 'date_submitted', 'submitter')
|
gremmie@1
|
12 list_filter = ('date_submitted', )
|
gremmie@1
|
13 search_fields = ('title', 'short_text', 'long_text')
|
gremmie@1
|
14 date_hierarchy = 'date_submitted'
|
gremmie@1
|
15
|
gremmie@1
|
16 class Media:
|
gremmie@1
|
17 js = ('js/tiny_mce/tiny_mce.js', 'js/tiny_mce_init_admin.js')
|
gremmie@1
|
18
|
gremmie@1
|
19
|
gremmie@1
|
20 class StoryAdmin(admin.ModelAdmin):
|
gremmie@1
|
21 list_display = ('title', 'date_published', 'submitter', 'category')
|
gremmie@1
|
22 list_filter = ('date_published', 'category')
|
gremmie@1
|
23 search_fields = ('title', 'short_text', 'long_text')
|
gremmie@1
|
24 date_hierarchy = 'date_published'
|
gremmie@1
|
25
|
gremmie@1
|
26 class Media:
|
gremmie@1
|
27 js = ('js/tiny_mce/tiny_mce.js', 'js/tiny_mce_init_admin.js')
|
gremmie@1
|
28
|
gremmie@1
|
29
|
gremmie@1
|
30 admin.site.register(Category)
|
gremmie@1
|
31 admin.site.register(Story, StoryAdmin)
|
gremmie@1
|
32 admin.site.register(PendingStory, PendingStoryAdmin)
|