Mercurial > public > sg101
comparison 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 |
comparison
equal
deleted
inserted
replaced
137:c7d75cdfea21 | 138:7ea842744a57 |
---|---|
2 This file contains the admin definitions for the bio application. | 2 This file contains the admin definitions for the bio application. |
3 """ | 3 """ |
4 | 4 |
5 from django.contrib import admin | 5 from django.contrib import admin |
6 from bio.models import UserProfile | 6 from bio.models import UserProfile |
7 from bio.models import UserProfileFlag | |
7 | 8 |
8 class UserProfileAdmin(admin.ModelAdmin): | 9 class UserProfileAdmin(admin.ModelAdmin): |
9 search_fields = ('user__username', 'user__first_name', 'user__last_name', 'user__email') | 10 search_fields = ('user__username', 'user__first_name', 'user__last_name', |
11 'user__email') | |
10 exclude = ('profile_html', 'signature_html') | 12 exclude = ('profile_html', 'signature_html') |
11 | 13 |
12 admin.site.register(UserProfile, UserProfileAdmin) | 14 |
15 class UserProfileFlagAdmin(admin.ModelAdmin): | |
16 list_display = ('__unicode__', 'flag_date', 'get_profile_url') | |
13 | 17 |
14 | 18 |
15 # vim: ts=4 sw=4 | 19 admin.site.register(UserProfile, UserProfileAdmin) |
20 admin.site.register(UserProfileFlag, UserProfileFlagAdmin) |