PageRenderTime 102ms CodeModel.GetById 60ms app.highlight 3ms RepoModel.GetById 37ms app.codeStats 0ms

/djangodblog/admin.py

http://django-db-log.googlecode.com/
Python | 15 lines | 12 code | 3 blank | 0 comment | 0 complexity | 51a40e1c40dc3f4a4f3ed73fcfc4c8f2 MD5 | raw file
 1from django.contrib import admin
 2from djangodblog.models import ErrorBatch, Error
 3
 4class ErrorBatchAdmin(admin.ModelAdmin):
 5    list_display    = ('class_name', 'is_resolved', 'message', 'last_seen', 'times_seen', 'url', 'server_name')
 6    list_filter     = ('class_name', 'times_seen', 'server_name', 'is_resolved')
 7    ordering        = ('-last_seen',)
 8
 9class ErrorAdmin(admin.ModelAdmin):
10    list_display    = ('class_name', 'message', 'datetime', 'url', 'server_name')
11    list_filter     = ('class_name', 'datetime', 'server_name')
12    ordering        = ('-datetime',)
13
14admin.site.register(ErrorBatch, ErrorBatchAdmin)
15admin.site.register(Error, ErrorAdmin)