Permalink
Browse files

object detail views respect live_objects manager

  • Loading branch information...
1 parent b3894eb commit 4f934b634be8711b3689138f93de1e3243ae0529 @ryanpitts ryanpitts committed Jun 23, 2012
Showing with 21 additions and 0 deletions.
  1. +6 −0 source/articles/views.py
  2. +5 −0 source/code/views.py
  3. +10 −0 source/people/views.py
View
@@ -104,3 +104,9 @@ def get_context_data(self, **kwargs):
class ArticleDetail(DetailView):
model = Article
+
+ def get_queryset(self):
+ queryset = Article.live_objects.all()
+
+ return queryset
+
View
@@ -35,3 +35,8 @@ def get_context_data(self, **kwargs):
class CodeDetail(DetailView):
model = Code
+
+ def get_queryset(self):
+ queryset = Code.live_objects.all()
+
+ return queryset
View
@@ -15,6 +15,11 @@ def get_queryset(self):
class PersonDetail(DetailView):
model = Person
+ def get_queryset(self):
+ queryset = Person.live_objects.all()
+
+ return queryset
+
@@ -29,3 +34,8 @@ def get_queryset(self):
class OrganizationDetail(DetailView):
model = Organization
+
+ def get_queryset(self):
+ queryset = Organization.live_objects.all()
+
+ return queryset

0 comments on commit 4f934b6

Please sign in to comment.