urls: """day42 URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/Examples:Function views 1. Add an import: from my_app import views 2. Add
1 如果没有创建超级管理员账号,先要创建python manage.py createsuperuser 2 在admin后台注册模型(如果没有这一步,登录http://127.0.0.1:8000/admin,看到admin用户只能添加用户,没有发表文章的一些功能) blog/admin.py from django.contrib import admin from .models import Post, Category, Tag admin.site.register(Post) ad