Mercurial > public > sg101
comparison bulletins/admin.py @ 581:ee87ea74d46b
For Django 1.4, rearranged project structure for new manage.py.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 05 May 2012 17:10:48 -0500 |
parents | gpp/bulletins/admin.py@ca66189c7c44 |
children |
comparison
equal
deleted
inserted
replaced
580:c525f3e0b5d0 | 581:ee87ea74d46b |
---|---|
1 ''' | |
2 This file contains the automatic admin site definitions for the Bulletins models. | |
3 ''' | |
4 | |
5 from django.contrib import admin | |
6 from django.conf import settings | |
7 | |
8 from bulletins.models import Bulletin | |
9 | |
10 class BulletinAdmin(admin.ModelAdmin): | |
11 list_display = ('title', 'start_date', 'end_date', 'is_enabled') | |
12 list_filter = ('start_date', 'end_date', 'is_enabled') | |
13 search_fields = ('title', 'text') | |
14 date_hierarchy = 'start_date' | |
15 | |
16 class Media: | |
17 js = settings.GPP_THIRD_PARTY_JS['tiny_mce'] | |
18 | |
19 | |
20 admin.site.register(Bulletin, BulletinAdmin) |