import os from django.urls import reverse from builder.base import BuildNew class BuildSightings(BuildNew): def build(self): self.build_detail_view() self.build_list_view( base_path=reverse("sightings:list"), paginate_by=24 ) print("building sightings") def get_model_queryset(self): return self.model.objects.all() def builder(): j = BuildSightings("ap", "sighting") j.build()