From 33dd9bf6e8bde9f91c21bac98e47c8a7d5ab985f Mon Sep 17 00:00:00 2001 From: lele555 <3583165504@qq.com> Date: Sat, 3 Oct 2026 11:35:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20project-a/articleapp/views?= =?UTF-8?q?.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- project-a/articleapp/views.py | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 project-a/articleapp/views.py diff --git a/project-a/articleapp/views.py b/project-a/articleapp/views.py new file mode 100644 index 0000000..42cebe5 --- /dev/null +++ b/project-a/articleapp/views.py @@ -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}) \ No newline at end of file