Article matching query does not exist.
article = models.Article.objects.get(id=1)
article = models.Article.objects.get(id=1)
2018-08-30
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.shortcuts import render from . import models from models import Article from django.http import HttpResponse def index(request): article = models.Article.objects.get(id=1) return render(request, 'blog/index.html', {'article': article})
举报