#!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.core.paginator import Paginator, InvalidPage
from django.http import Http404

from haystack.views import SearchView

from opps.articles.models import Post, Album
from opps.articles.views.generic import OppsDetail, OppsList


class PostList(OppsList):
    def __init__(self):
        self.obj = Post
        self.type = "channels"


class PostDetail(OppsDetail):
    def __init__(self):
        self.obj = Post
        self.type = 'articles'


class AlbumList(OppsList):
    def __init__(self):
        self.obj = Album
        self.type = "channels/album"


class AlbumDetail(OppsDetail):
    def __init__(self):
        self.obj = Album
        self.type = 'articles/album'


class Search(SearchView):
    def get_results(self):
        return self.form.search().order_by('-date_available')

    def build_page(self):
        paginator = Paginator(self.results, self.results_per_page)
        try:
            paginator.page(int(self.request.GET.get('page', 1)))
        except InvalidPage:
            raise Http404("No such page!")

        return (None, self.results)

@@ -310,41 +310,8 @@
     
-def __init__(self):%0A        self.
 obj 
@@ -317,33 +317,24 @@
  = Post%0A    
-    self.
 type = %22chan
@@ -379,41 +379,8 @@
     
-def __init__(self):%0A        self.
 obj 
@@ -386,33 +386,24 @@
  = Post%0A    
-    self.
 type = 'arti
@@ -445,41 +445,8 @@
     
-def __init__(self):%0A        self.
 obj 
@@ -453,33 +453,24 @@
 = Album%0A    
-    self.
 type = %22chan
@@ -522,41 +522,8 @@
     
-def __init__(self):%0A        self.
 obj 
@@ -538,17 +538,8 @@
     
-    self.
 type

Remove __init view articles