This repository has been archived on 2023-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
python-blog/articles/views.py

15 lines
295 B
Python
Raw Normal View History

2020-08-14 15:53:42 +02:00
from django.views import generic
2020-08-14 14:53:30 +02:00
2020-08-14 15:53:42 +02:00
from articles.models import Article
class ArticlesListView(generic.ListView):
model = Article
paginate_by = 15
context_object_name = "articles"
class ArticleDetailView(generic.DetailView):
model = Article
context_object_name = "article"