diff options
author | luxagraf <sng@luxagraf.net> | 2018-01-28 10:30:57 -0600 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2018-01-28 10:30:57 -0600 |
commit | 916474036c1d2e041ed6425a3c0370a2e4c7e7bc (patch) | |
tree | 0536598b9a114303102f6f66242fb31d51beea36 /app/sightings/build.py | |
parent | a278fc64c1dcd5321492a7dc384305b8719cb85e (diff) |
abstracted birds out to sightings
Diffstat (limited to 'app/sightings/build.py')
-rw-r--r-- | app/sightings/build.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/app/sightings/build.py b/app/sightings/build.py new file mode 100644 index 0000000..565b675 --- /dev/null +++ b/app/sightings/build.py @@ -0,0 +1,21 @@ +import os +from django.urls 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() |