美文网首页
二、建立博客应用

二、建立博客应用

作者: Treehl | 来源:发表于2018-05-03 17:59 被阅读0次

二、建立博客应用

这里创建3个app

  • blog
  • config
  • comment
  1. blog应用中包含文章、分类、标签
  2. config应用包含侧边栏和友联
  3. comment应用单独放一个评论

python manage.py startapp blog

python manage.py startapp config

python manage.py startapp comment

这样就创建好了三个应用,接下来我们需要在setting.py中安装应用

# Myblog/Myblog/settings.py
INSTALLED_APPS = [
    'blog',
    'config',
    'comment',
    ....
image

GitHub
欢迎访问Treehl的博客

相关文章

网友评论

      本文标题:二、建立博客应用

      本文链接:https://www.haomeiwen.com/subject/ejelrftx.html