blog/models.py
添加 type=models.CharField(max_length=20,default='django')
添加字段后记得使用makemigrations 和migrate
blog/urls.py

blog/views.py

templates/django_list.html

修改base.html

现在可以正常访问咯~~
blog/models.py
添加 type=models.CharField(max_length=20,default='django')
添加字段后记得使用makemigrations 和migrate
blog/urls.py
blog/views.py
templates/django_list.html
修改base.html
现在可以正常访问咯~~
本文标题:4.设置文章列表
本文链接:https://www.haomeiwen.com/subject/skstzttx.html
网友评论