1.创建数据库表
blog/models.py
日期时间格式:http://blog.csdn.net/u012422446/article/details/52583641
model字段清单:http://www.cnblogs.com/lhj588/archive/2012/05/24/2516040.html

2.setting文件设置
mysite/setting.py
创建时默认有,无需再添加‘blog’

修改时区和语言:
zh-Hans
Asia/Shanghai

3.数据表添加
makemigrations 和migrate用法:http://www.ziqiangxuetang.com/django/django-schema-migration.html


4.修改admin.py
blog/admin.py

5.创建admin账号
根目录下
python manage.py createsuperuser

6.后台添加文章后修改views
blog/views.py

7.修改index文件
templates/index.html

完成
网友评论