newmediamonitoring1/dashboard/admin.py

43 lines
1.3 KiB
Python
Raw Normal View History

2020-09-13 06:06:21 +00:00
from django.contrib import admin
# Register your models here.
from django_summernote.admin import SummernoteModelAdmin
from dashboard.models import Userprofile, Organization, Group, Level, Organizationtype, Group_type, Weixin_data, Weixin, \
News
class UserProfileAdmin(admin.ModelAdmin):
list_display = ('id',)
admin.site.register(Userprofile,UserProfileAdmin)
class OrganizationAdmin(admin.ModelAdmin):
list_display = ('id',)
admin.site.register(Organization,OrganizationAdmin)
class GroupAdmin(admin.ModelAdmin):
list_display = ('id',)
admin.site.register(Group,GroupAdmin)
class LevelAdmin(admin.ModelAdmin):
list_display = ('id',)
admin.site.register(Level,LevelAdmin)
class OrganizationtypeAdmin(admin.ModelAdmin):
list_display = ('id',)
admin.site.register(Organizationtype,OrganizationtypeAdmin)
class Group_typeAdmin(admin.ModelAdmin):
list_display = ('id',)
admin.site.register(Group_type,Group_typeAdmin)
class Weixin_data_typeAdmin(admin.ModelAdmin):
list_display = ('id',)
admin.site.register(Weixin_data,Weixin_data_typeAdmin)
class WeixinAdmin(admin.ModelAdmin):
list_display = ('id',)
admin.site.register(Weixin,WeixinAdmin)
class NewsAdmin(SummernoteModelAdmin):
summernote_fields = ('content',)
admin.site.register(News,NewsAdmin)