admin.py 1.04 KB
Newer Older
1
2
3
4
from django.contrib import admin
from bt import models

class ViolationAdmin(admin.ModelAdmin):
5
6
   list_display = ('state', 'country', 'operator', 'contract', 'resource_name', 'media', 'activationid')
   list_filter = ('state', 'operator', 'contract', 'resource_name', 'media', 'country')
7
8
9
admin.site.register(models.Violation, ViolationAdmin)

class CommentAdmin(admin.ModelAdmin):
10
11
   list_display = ('violation', 'submitter_name', 'comment')
   list_filter = ('violation', 'submitter_name')
12
13
14
admin.site.register(models.Comment, CommentAdmin)

class AttachmentAdmin(admin.ModelAdmin):
15
   list_display = ('name', 'comment')
16
17
18
admin.site.register(models.Attachment, AttachmentAdmin)

class ConfirmationAdmin(admin.ModelAdmin):
19
20
   list_display = ('violation', 'key')
   list_filter = ('violation__operator', 'violation__contract', 'violation__resource_name', 'violation__media', 'violation__country')
21
admin.site.register(models.Confirmation, ConfirmationAdmin)
22
23
24
25

class FeaturedCaseAdmin(admin.ModelAdmin):
    pass
admin.site.register(models.FeaturedCase, FeaturedCaseAdmin)