forked from ITStudio_OUC/ProgrammeHomework
添加 project-a/articleapp/views.py
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
from django.shortcuts import render
|
||||
from .models import Article
|
||||
|
||||
def index(request):
|
||||
articles = Article.objects.all()
|
||||
return render(request, "index.html", {"articles": articles})
|
||||
Reference in New Issue
Block a user