summaryrefslogtreecommitdiff
path: root/app/essays/views.py
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2019-02-08 13:47:02 -0600
committerluxagraf <sng@luxagraf.net>2019-02-08 13:47:02 -0600
commitee62ce525c5c5c1b3abd25673598360f2ccd79cc (patch)
treeead317f6b487fc31219a48a1baf7d17cabcf4ce3 /app/essays/views.py
parent27aaf92d26eb75157dcfa923a5d63ea63feeb98c (diff)
changed essays to allow easier building
Diffstat (limited to 'app/essays/views.py')
-rw-r--r--app/essays/views.py13
1 files changed, 2 insertions, 11 deletions
diff --git a/app/essays/views.py b/app/essays/views.py
index 0fdaa63..f8c68c7 100644
--- a/app/essays/views.py
+++ b/app/essays/views.py
@@ -3,25 +3,16 @@ from django.views.generic.detail import DetailView
from django.contrib.syndication.views import Feed
-from .models import Essay, PostType, POST_TYPE
+from .models import Essay
class EssayListView(ListView):
model = Essay
def get_queryset(self, **kwargs):
- t = self.request.path.split('/')[1]
- type_reverse = dict((v, k) for k, v in POST_TYPE)
- self.essay_type = t
- qs = Essay.objects.filter(post_type=type_reverse[t])
+ qs = Essay.objects.filter(status=1)
return qs
- def get_context_data(self, **kwargs):
- # Call the base implementation first to get a context
- context = super(EssayListView, self).get_context_data(**kwargs)
- context['essay_type'] = PostType.objects.get(slug=self.essay_type)
- return context
-
class EntryDetailView(DetailView):
model = Essay