Navigation Menu

Skip to content
This repository has been archived by the owner on Dec 22, 2021. It is now read-only.

Commit

Permalink
object detail views respect live_objects manager
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanpitts committed Jun 23, 2012
1 parent b3894eb commit 4f934b6
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
6 changes: 6 additions & 0 deletions source/articles/views.py
Expand Up @@ -104,3 +104,9 @@ def get_context_data(self, **kwargs):


class ArticleDetail(DetailView): class ArticleDetail(DetailView):
model = Article model = Article

def get_queryset(self):
queryset = Article.live_objects.all()

return queryset

5 changes: 5 additions & 0 deletions source/code/views.py
Expand Up @@ -35,3 +35,8 @@ def get_context_data(self, **kwargs):


class CodeDetail(DetailView): class CodeDetail(DetailView):
model = Code model = Code

def get_queryset(self):
queryset = Code.live_objects.all()

return queryset
10 changes: 10 additions & 0 deletions source/people/views.py
Expand Up @@ -15,6 +15,11 @@ def get_queryset(self):
class PersonDetail(DetailView): class PersonDetail(DetailView):
model = Person model = Person


def get_queryset(self):
queryset = Person.live_objects.all()

return queryset







Expand All @@ -29,3 +34,8 @@ def get_queryset(self):


class OrganizationDetail(DetailView): class OrganizationDetail(DetailView):
model = Organization model = Organization

def get_queryset(self):
queryset = Organization.live_objects.all()

return queryset

0 comments on commit 4f934b6

Please sign in to comment.