#coding:utf-8 from django.contrib import admin from django_summernote.admin import SummernoteModelAdmin from .models import Page, Member, Introduction class PageAdmin(SummernoteModelAdmin): model = Page list_display = ('id', 'name', 'title', 'created', 'updated') search_fields = ('title',) list_per_page = 10 class MemberAdmin(SummernoteModelAdmin): model = Member list_display = ('id', 'name', 'number') search_fields = ('name',) list_per_page = 10 class IntroductionAdmin(SummernoteModelAdmin): model = Introduction list_display = ('id', 'title') search_fields = ('title',) list_per_page = 10 admin.site.register(Page, PageAdmin) admin.site.register(Member, MemberAdmin) admin.site.register(Introduction, IntroductionAdmin)