summaryrefslogtreecommitdiff
path: root/app/tutorials/views.py
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2019-05-05 11:40:42 -0500
committerluxagraf <sng@luxagraf.net>2019-05-05 11:40:42 -0500
commita2891841fbf1e5660693a1f9109f2e6810224a3b (patch)
treebe0aae73fe8f5e6271a76e8c5c6dc35b00f347a6 /app/tutorials/views.py
parentbdc06f56d538358f1fa07d35afb5733c790e3ab2 (diff)
added tutorials with commentsHEADmaster
Diffstat (limited to 'app/tutorials/views.py')
-rw-r--r--app/tutorials/views.py23
1 files changed, 23 insertions, 0 deletions
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"
+
+