添加 project-a/articleapp/views.py

This commit is contained in:
2026-10-03 11:35:28 +08:00
parent a7dbcbd931
commit 33dd9bf6e8
+6
View File
@@ -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})