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