from django.contrib import admin from .models import Article, Tag, ArticleClass, Draft # Register your models here. class ArticleAdmin(admin.ModelAdmin): list_display = ["ArticleId", "Publisher", "Title", "Content", "Cover", "Read", "Like", "Publish_Time", "Edit_Time"] class ArticleClassAdmin(admin.ModelAdmin): list_display = ["Name", ] class TagAdmin(admin.ModelAdmin): list_display = ["Name", ] class DraftAdmin(admin.ModelAdmin): list_display = ["DraftId", "Poster", "Title", "Content", "Add_Time", "Edit_Time", ] admin.site.register(Article, ArticleAdmin) admin.site.register(Tag, TagAdmin) admin.site.register(ArticleClass, ArticleClassAdmin) admin.site.register(Draft, DraftAdmin)