Mercurial > public > sg101
annotate gpp/bio/admin.py @ 138:7ea842744a57
Ticket #15, add a way to report user profiles.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Fri, 27 Nov 2009 21:55:32 +0000 |
parents | dbd703f7d63a |
children | 152d77265da6 |
rev | line source |
---|---|
gremmie@1 | 1 """ |
gremmie@1 | 2 This file contains the admin definitions for the bio application. |
gremmie@1 | 3 """ |
gremmie@1 | 4 |
gremmie@1 | 5 from django.contrib import admin |
gremmie@1 | 6 from bio.models import UserProfile |
bgneal@138 | 7 from bio.models import UserProfileFlag |
gremmie@1 | 8 |
gremmie@1 | 9 class UserProfileAdmin(admin.ModelAdmin): |
bgneal@138 | 10 search_fields = ('user__username', 'user__first_name', 'user__last_name', |
bgneal@138 | 11 'user__email') |
gremmie@1 | 12 exclude = ('profile_html', 'signature_html') |
gremmie@1 | 13 |
bgneal@138 | 14 |
bgneal@138 | 15 class UserProfileFlagAdmin(admin.ModelAdmin): |
bgneal@138 | 16 list_display = ('__unicode__', 'flag_date', 'get_profile_url') |
bgneal@138 | 17 |
bgneal@138 | 18 |
gremmie@1 | 19 admin.site.register(UserProfile, UserProfileAdmin) |
bgneal@138 | 20 admin.site.register(UserProfileFlag, UserProfileFlagAdmin) |