... from django.utils import timezone from django.views.generic.list import ListView from articles.models import Article class ArticleListView ( ListView ): model = Article paginate_by = 100 # if pagination is desired def get_context_data ( self , ** kwargs ): cont ... ext [ "now" ] = timezone . now () return context 例 myapp/urls.py : from django.urls import path from article.views import ArticleListView urlpatterns = [ path ( "" , ArticleListView . as_view (), name = "article-list" ), ] 例 myapp/article_list.html : < h1 > A ... 2026年10月08日