1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
from ircTrack.bt.models import UserProfile,Ban,Kick,Event,Mark,Comment
from django.contrib import admin
def full_log(obj):
return obj.log
full_log.short_description = 'Log'
class KickAdmin(admin.ModelAdmin):
fields = ('channel','operator','hostmask','reason','log',)
raw_id_fields = ('log',)
list_display = ('create_date','channel','hostmask','operator','reason',)
class MarkAdmin(admin.ModelAdmin):
fields = ('channel','operator','hostmask','reason','log',)
raw_id_fields = ('log',)
list_display = ('create_date','channel','hostmask','operator','reason',)
class BanAdmin(admin.ModelAdmin):
fields = ('channel','operator','hostmask','mask','removal_date','removed_by',)
raw_id_fields = ('log',)
list_display = ('create_date','channel','hostmask','operator','mask','is_removed',)
admin.site.register(Kick,KickAdmin)
admin.site.register(UserProfile)
admin.site.register(Ban,BanAdmin)
admin.site.register(Mark,MarkAdmin)
|