Ticket #12599: admin.py

File admin.py, 584 bytes (added by handelaar, 15 years ago)
Line 
1from django.contrib import admin
2from parliament.models import Alert, Twfyuser, ApiKey, Member, Hansard, Moffice, Epobject, Anonvotes, Indexbatch, Uservotes, SearchQueryLog, Chamber, Person, Expense
3
4class MofficeInline(admin.TabularInline):
5 model = Moffice
6 exclude = ('moffice_id',)
7
8class ExpenseInline(admin.TabularInline):
9 model = Expense
10
11class PersonAdmin(admin.ModelAdmin):
12 ordering = ('name',)
13 inlines = [
14 MofficeInline,
15 ExpenseInline,
16 ]
17
18admin.site.register(Person,PersonAdmin)
19
Back to Top