app应用中admin.py
from django.contrib import admin from app01 import models # Register your models here. admin.site.register(models.Book) admin.site.register(models.Author) admin.site.register(models.AuthorDetail) admin.site.register(models.Publish)点击Tools 中run manage.py task 执行createsuperuser创建一个超级用户(username和password),然后可以访问:8000/admin/ ,可以直接操作数据库进行增删改查。
| 访问:8000/admin/ |