Mercurial > public > sg101
comparison gpp/bulletins/admin.py @ 7:ca66189c7c44
Added tiny_mce to the GPP_THIRD_PARTY_JS setting. Updated code to use it.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sun, 12 Apr 2009 00:31:36 +0000 |
parents | dbd703f7d63a |
children |
comparison
equal
deleted
inserted
replaced
6:b6263ac72052 | 7:ca66189c7c44 |
---|---|
1 ''' | 1 ''' |
2 This file contains the automatic admin site definitions for the Bulletins models. | 2 This file contains the automatic admin site definitions for the Bulletins models. |
3 ''' | 3 ''' |
4 | 4 |
5 from django.contrib import admin | 5 from django.contrib import admin |
6 from django.conf import settings | |
7 | |
6 from bulletins.models import Bulletin | 8 from bulletins.models import Bulletin |
7 | 9 |
8 class BulletinAdmin(admin.ModelAdmin): | 10 class BulletinAdmin(admin.ModelAdmin): |
9 list_display = ('title', 'start_date', 'end_date', 'is_enabled') | 11 list_display = ('title', 'start_date', 'end_date', 'is_enabled') |
10 list_filter = ('start_date', 'end_date', 'is_enabled') | 12 list_filter = ('start_date', 'end_date', 'is_enabled') |
11 search_fields = ('title', 'text') | 13 search_fields = ('title', 'text') |
12 date_hierarchy = 'start_date' | 14 date_hierarchy = 'start_date' |
13 | 15 |
14 class Media: | 16 class Media: |
15 js = ('js/tiny_mce/tiny_mce.js', 'js/tiny_mce_init_admin.js') | 17 js = settings.GPP_THIRD_PARTY_JS['tiny_mce'] |
16 | 18 |
17 | 19 |
18 admin.site.register(Bulletin, BulletinAdmin) | 20 admin.site.register(Bulletin, BulletinAdmin) |