I{'article': article} 出错了,不知是什么原因?
from django.shortcuts import render from django.http import HttpResponse from . import models def index(request): article = models.Article.objects.get(pk=1) return render(request, 'blog\index.html', I{'article': article})