From a2891841fbf1e5660693a1f9109f2e6810224a3b Mon Sep 17 00:00:00 2001 From: luxagraf Date: Sun, 5 May 2019 11:40:42 -0500 Subject: added tutorials with comments --- app/tutorials/views.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 app/tutorials/views.py (limited to 'app/tutorials/views.py') diff --git a/app/tutorials/views.py b/app/tutorials/views.py new file mode 100644 index 0000000..ab51ef2 --- /dev/null +++ b/app/tutorials/views.py @@ -0,0 +1,23 @@ +from django.views.generic import ListView +from django.views.generic.detail import DetailView + + +from .models import Tutorial + + +class TutorialListView(ListView): + model = Tutorial + + def get_queryset(self): + return Tutorial.objects.all() + + +class EntryDetailView(DetailView): + model = Tutorial + slug_field = "slug" + + +class EntryDetailViewTXT(EntryDetailView): + template_name = "blog/entry_detail.txt" + + -- cgit v1.2.3-70-g09d2