from django.contrib import admin from django_summernote.admin import SummernoteModelAdmin from .models import ResultStandard, Paper, Patent, WinResult # Register your models here. class ResultStandardAdmin(SummernoteModelAdmin): model = ResultStandard list_display = ('id', 'created', 'updated', 'category', 'number', 'result_name', 'direction', 'standard', 'included_time') search_fields = ('result_name',) list_per_page = 10 class PaperAdmin(SummernoteModelAdmin): model = Paper list_display = ('id', 'created', 'updated', 'category', 'number', 'result_type', 'result_name', 'people', 'publication', 'publication_time') search_fields = ('results_name',) list_per_page = 10 class PatentAdmin(SummernoteModelAdmin): model = Patent list_display = ('id', 'created', 'updated', 'category', 'number', 'patent', 'patent_number', 'patent_type', 'patent_time') search_fields = ('patent',) list_per_page = 10 class WinResultsAdmin(SummernoteModelAdmin): model = WinResult list_display = ('id', 'created', 'updated', 'category', 'number', 'result_name', 'direction', 'level', 'win_time', 'people') search_fields = ('result_name',) list_per_page = 10 admin.site.register(ResultStandard, ResultStandardAdmin) admin.site.register(Paper, PaperAdmin) admin.site.register(Patent, PatentAdmin) admin.site.register(WinResult, WinResultsAdmin)