【发布时间】:2019-11-09 09:45:22
【问题描述】:
from django.shortcuts import render
def index(request):
context = {
'title' : 'test'
}
return render(request,'index.html',context)
TabError: 缩进中制表符和空格的使用不一致
【问题讨论】:
-
context应该是dict;请先阅读 Pythondict。 -
我刚刚编辑了问题,请再看一遍
-
这能回答你的问题吗? Using Django view variables inside templates
标签: django python-3.x django-2.2