您好,老师我这段代码当中,models下的Article没有objects这个方法,请问有遇到这个问题吗?
from django.shortcuts import render
from blog.models import Article
from django.http import HttpResponse
# Create your views here.
def index(request):
article = Article.objects.get(pk=1)
return render(request, 'index.html', {'article':article})
def john(request):
return render(request, 'jieshao.html', {'jieshao': 'This my first Django web'})