from django.contrib import admin
from blog.models import Article, Catalogue

# Register your models here.

@admin.register(Article)
class ArticleAdmin(admin.ModelAdmin):
    list_display = ['title', 'summary', 'author','body','id'] # 显示列表项
    list_filter = ('author',) # 过滤器

@admin.register(Catalogue)
class CatalogueAdmin(admin.ModelAdmin):
        list_display = ['name', 'disc', 'id']
4467dca56c5fb7f63f9aeadcad502649ad60cdc4
<mask token>


@admin.register(Catalogue)
class CatalogueAdmin(admin.ModelAdmin):
    list_display = ['name', 'disc', 'id']

<mask token>


@admin.register(Article)
class ArticleAdmin(admin.ModelAdmin):
    <mask token>
    <mask token>


@admin.register(Catalogue)
class CatalogueAdmin(admin.ModelAdmin):
    list_display = ['name', 'disc', 'id']

<mask token>


@admin.register(Article)
class ArticleAdmin(admin.ModelAdmin):
    list_display = ['title', 'summary', 'author', 'body', 'id']
    list_filter = 'author',


@admin.register(Catalogue)
class CatalogueAdmin(admin.ModelAdmin):
    list_display = ['name', 'disc', 'id']

from django.contrib import admin
from blog.models import Article, Catalogue


@admin.register(Article)
class ArticleAdmin(admin.ModelAdmin):
    list_display = ['title', 'summary', 'author', 'body', 'id']
    list_filter = 'author',


@admin.register(Catalogue)
class CatalogueAdmin(admin.ModelAdmin):
    list_display = ['name', 'disc', 'id']

from django.contrib import admin
from blog.models import Article, Catalogue

# Register your models here.

@admin.register(Article)
class ArticleAdmin(admin.ModelAdmin):
    list_display = ['title', 'summary', 'author','body','id'] # 显示列表项
    list_filter = ('author',) # 过滤器

@admin.register(Catalogue)
class CatalogueAdmin(admin.ModelAdmin):
        list_display = ['name', 'disc', 'id']