import os from django.core.urlresolvers import reverse from builder.base import BuildNew class BuildBirds(BuildNew): def build(self): self.build_detail_view() self.build_list_view( base_path=reverse("birds:list_redirect"), paginate_by=24 ) print("building birds") def get_model_queryset(self): return self.model.objects.all() def builder(): j = BuildBirds("birds", "birdsighting") j.build()