source: django_apps/foobar/admin.py@ 406

Last change on this file since 406 was 302, checked in by Rick van der Zwet, 14 years ago

Some awefull hack to get a 2x2 single value table displayed for easy editing...

File size: 460 bytes
Line 
1from foobar.models import *
2from django.contrib import admin
3
4class AlertInline(admin.TabularInline):
5 model = Alert
6 extra = 0
7 max_num = 0
8 can_delete = False
9 readonly_fields = ('service',)
10 fields = ('service', 'enable')
11
12class RoleAdmin(admin.ModelAdmin):
13 inlines = [ AlertInline, ]
14 class Media:
15 css = { "all" : ("css/hide_admin_original.css",) }
16admin.site.register(Role, RoleAdmin)
17admin.site.register(Service)
18#admin.site.register(Alert)
Note: See TracBrowser for help on using the repository browser.