from django.views.generic import DetailView
from models import InfoPage

class InfoPageView(DetailView):
    """Show the page, or 'index' if no slug"""
    model = InfoPage

from django.views.generic import DetailView
from models import InfoPage

class InfoPageView(DetailView):
    """Show the page for the given slug"""
    model = InfoPage
    queryset = InfoPage.objects.filter(kind=InfoPage.KIND_PAGE)

Use a queryset to display only kind=page
Use a queryset to display only kind=page

  from django.views.generic import DetailView
  from models import InfoPage
  
  class InfoPageView(DetailView):
-     """Show the page, or 'index' if no slug"""
+     """Show the page for the given slug"""
      model = InfoPage
+     queryset = InfoPage.objects.filter(kind=InfoPage.KIND_PAGE)
  
Use a queryset to display only kind=page
## Code Before:
from django.views.generic import DetailView
from models import InfoPage

class InfoPageView(DetailView):
    """Show the page, or 'index' if no slug"""
    model = InfoPage

## Instruction:
Use a queryset to display only kind=page
## Code After:
from django.views.generic import DetailView
from models import InfoPage

class InfoPageView(DetailView):
    """Show the page for the given slug"""
    model = InfoPage
    queryset = InfoPage.objects.filter(kind=InfoPage.KIND_PAGE)
