from django.core.exceptions import ImproperlyConfigured
from django.core.urlresolvers import reverse
from django.views.generic import DetailView
from django.utils.translation import ugettext as _
from django.contrib.syndication.views import Feed
from django.shortcuts import get_object_or_404

from .models import Section


class SimpleSectionView(DetailView):
    context_object_name = 'section'
    model = Section

    def get_object(self, queryset=None):
        return get_object_or_404(self.get_queryset(),
                                 full_slug=self.kwargs['full_slug'])


class SectionFeed(Feed):
    def __init__(self, section_view, *args, **kwargs):
        self.section_view = section_view

    def get_object(self, request, full_slug):
        return Section.objects.get(full_slug=full_slug)

    def title(self, section):
        return section.title

    def link(self, section):
        return reverse(self.section_view,
                kwargs={'full_slug': section.full_slug})

    def description(self, section):
        return section.summary

    def items(self, section):
        return section.items

from django.core.exceptions import ImproperlyConfigured
from django.core.urlresolvers import reverse
from django.views.generic import TemplateView
from django.utils.translation import ugettext as _
from django.contrib.syndication.views import Feed
from django.shortcuts import get_object_or_404

from .models import Section


class SimpleSectionView(TemplateView):
    well_title = None

    def get_section(self):
        return get_object_or_404(Section, full_slug=self.kwargs['full_slug'])

    def get_context_data(self, **kwargs):
        context = super(SimpleSectionView, self).get_context_data(**kwargs)
        context["section"] = self.get_section()
        return context


class SectionFeed(Feed):
    def __init__(self, section_view, *args, **kwargs):
        self.section_view = section_view

    def get_object(self, request, full_slug):
        return Section.objects.get(full_slug=full_slug)

    def title(self, section):
        return section.title

    def link(self, section):
        return reverse(self.section_view,
                kwargs={'full_slug': section.full_slug})

    def description(self, section):
        return section.summary

    def items(self, section):
        return section.items

--- 
+++ 
@@ -1,6 +1,6 @@
 from django.core.exceptions import ImproperlyConfigured
 from django.core.urlresolvers import reverse
-from django.views.generic import TemplateView
+from django.views.generic import DetailView
 from django.utils.translation import ugettext as _
 from django.contrib.syndication.views import Feed
 from django.shortcuts import get_object_or_404
@@ -8,16 +8,13 @@
 from .models import Section
 
 
-class SimpleSectionView(TemplateView):
-    well_title = None
+class SimpleSectionView(DetailView):
+    context_object_name = 'section'
+    model = Section
 
-    def get_section(self):
-        return get_object_or_404(Section, full_slug=self.kwargs['full_slug'])
-
-    def get_context_data(self, **kwargs):
-        context = super(SimpleSectionView, self).get_context_data(**kwargs)
-        context["section"] = self.get_section()
-        return context
+    def get_object(self, queryset=None):
+        return get_object_or_404(self.get_queryset(),
+                                 full_slug=self.kwargs['full_slug'])
 
 
 class SectionFeed(Feed):
Refactor SimpleSectionView to inherit DetailView