This commit is contained in:
2024-07-20 11:36:35 +02:00
commit 74b43cd8fa
81 changed files with 3131 additions and 0 deletions

15
blog/views.py Normal file
View File

@@ -0,0 +1,15 @@
from django.views.generic import ListView, DetailView
from blog.models import Article
class ArticleListView(ListView):
model = Article
template_name = 'blog/article_list.html'
context_object_name = 'articles'
class ArticleDetailView(DetailView):
model = Article
template_name = 'blog/article_detail.html'
context_object_name = 'article'