Advertisement
Darkolius

Untitled

Nov 11th, 2020
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.36 KB | None | 0 0
  1. class ArticleListView(generic.ListView):
  2.     model = Article
  3.     template_name = 'blog/article_list.html'
  4.     context_object_name = 'articles'
  5.     queryset = Article.objects.all()
  6.  
  7.     def get_context_data(self, *, object_list=None, **kwargs):
  8.         context = super().get_context_data()
  9.         context['one'] = "blog:article-create"
  10.         return context
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement