Last change
on this file since 359 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 | |
---|
1 | from foobar.models import *
|
---|
2 | from django.contrib import admin
|
---|
3 |
|
---|
4 | class 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 |
|
---|
12 | class RoleAdmin(admin.ModelAdmin):
|
---|
13 | inlines = [ AlertInline, ]
|
---|
14 | class Media:
|
---|
15 | css = { "all" : ("css/hide_admin_original.css",) }
|
---|
16 | admin.site.register(Role, RoleAdmin)
|
---|
17 | admin.site.register(Service)
|
---|
18 | #admin.site.register(Alert)
|
---|
Note:
See
TracBrowser
for help on using the repository browser.