1、在views里面查到数据,增加内容
def index(request):
catagories = Category.objects.filter(is_delete=False)
today = "22222"
# return HttpResponse("哈哈哈哈")
data = {'nav':catagories,'today1':today}
return render(request,'index.html',data)
2、在index里面添加内容修改,然后在页面显示
<ul id="starlist">
{% for n in nav %}
<li><a href="index.html">{{ n.name }}</a></li>
{% endfor %}
</ul>
3、
4、