UserMessageInfo in admin.py

Brightcells 9 years ago
parent
commit
8f14561134
1 changed files with 11 additions and 1 deletions
  1. 11 1
      message/admin.py

+ 11 - 1
message/admin.py

@@ -1,3 +1,13 @@
1
+# -*- coding: utf-8 -*-
2
+
1 3
 from django.contrib import admin
2 4
 
3
-# Register your models here.
5
+from message.models import UserMessageInfo
6
+
7
+
8
+class UserMessageInfoAdmin(admin.ModelAdmin):
9
+    list_display = ('from_uid', 'from_nickname', 'from_avatar', 'to_uid', 'group_id', 'photo_id', 'msg_type', 'read', 'status', 'created_at', 'updated_at')
10
+    list_filter = ('msg_type', 'read', 'status')
11
+
12
+
13
+admin.site.register(UserMessageInfo, UserMessageInfoAdmin)