From d82085673bb2b44575bac72fdc97ba4c50a1f649 Mon Sep 17 00:00:00 2001 From: Thomas Steen Rasmussen Date: Sun, 5 Jun 2016 23:34:30 +0200 Subject: [PATCH] set context_object_name for NewsDetail view --- news/views.py | 1 + 1 file changed, 1 insertion(+) diff --git a/news/views.py b/news/views.py index 2cf4b9e0..aba60599 100644 --- a/news/views.py +++ b/news/views.py @@ -12,4 +12,5 @@ class NewsIndex(ListView): class NewsDetail(DetailView): model = models.NewsItem template_name = 'news_detail.html' + context_object_name = 'news_item'