要现在admin.py文件中将你要视图化操作的类进行注册:
from django.contrib import admin from api import models # Register your models here. admin.site.register(models.Course) admin.site.register(models.ContentType) admin.site.register(models.CourseCategory) admin.site.register(models.CourseChapter) admin.site.register(models.CourseDetail)
在manage.py命令下执行createsuperuser命令