Mercurial > public > sg101
comparison gpp/shoutbox/admin.py @ 13:777451a98f9d
Shoutbox work: shouts now have absolute URLs. Shouts can now be flagged as abuse. Minor tweak to breadcrumbs css. Added flag date to comments admin.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Thu, 16 Apr 2009 02:00:17 +0000 |
parents | dbd703f7d63a |
children | e1d1a70d312d |
comparison
equal
deleted
inserted
replaced
12:f408971657b9 | 13:777451a98f9d |
---|---|
1 """ | 1 """ |
2 This file contains the automatic admin site definitions for the shoutbox models. | 2 This file contains the automatic admin site definitions for the shoutbox models. |
3 """ | 3 """ |
4 from django.contrib import admin | 4 from django.contrib import admin |
5 from shoutbox.models import Shout | 5 from shoutbox.models import Shout |
6 from shoutbox.models import ShoutFlag | |
6 | 7 |
7 class ShoutAdmin(admin.ModelAdmin): | 8 class ShoutAdmin(admin.ModelAdmin): |
8 list_display = ('shout_date', '__unicode__') | 9 list_display = ('shout_date', '__unicode__') |
9 raw_id_fields = ('user', ) | 10 raw_id_fields = ('user', ) |
11 | |
12 class ShoutFlagAdmin(admin.ModelAdmin): | |
13 list_display = ('__unicode__', 'flag_date', 'get_shout_url') | |
14 | |
10 | 15 |
11 admin.site.register(Shout, ShoutAdmin) | 16 admin.site.register(Shout, ShoutAdmin) |
17 admin.site.register(ShoutFlag, ShoutFlagAdmin) | |
18 | |
19 # vim: ts=4 sw=4 |