set context_object_name for NewsDetail view
This commit is contained in:
parent
40427a1bc4
commit
d82085673b
|
@ -12,4 +12,5 @@ class NewsIndex(ListView):
|
|||
class NewsDetail(DetailView):
|
||||
model = models.NewsItem
|
||||
template_name = 'news_detail.html'
|
||||
context_object_name = 'news_item'
|
||||
|
||||
|
|
Loading…
Reference in a new issue