From dcab104af3e89a97c3834b10c8c98229fb5308fe Mon Sep 17 00:00:00 2001 From: luxagraf Date: Sun, 28 Jan 2018 10:35:35 -0600 Subject: cleaned up sightings build and admin code --- app/builder/views.py | 8 ++++---- app/sightings/build.py | 8 ++++---- design/templates/admin/buttons.html | 2 +- design/templates/admin/index.html | 4 ++-- design/templates/details/entry.html | 4 ++-- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/app/builder/views.py b/app/builder/views.py index 4547689..9e4671e 100644 --- a/app/builder/views.py +++ b/app/builder/views.py @@ -5,7 +5,7 @@ from src.build import builder as src_builder from jrnl.build import archive_builder, detail_builder, home_builder, rss_builder, map_builder from resume.build import builder as resume_builder from books.build import builder as book_builder -from birds.build import builder as bird_builder +from sightings.build import builder as sightings_builder from photos.build import builder as photo_builder from figments.build import builder as figments_builder from notes.build import builder as notes_builder @@ -41,9 +41,9 @@ def do_build(request): elif section == 'buildbooks': context = {'message': 'Writing Book Pages to Disk'} book_builder() - elif section == 'buildbirds': - context = {'message': 'Writing Bird Pages to Disk'} - bird_builder() + elif section == 'buildsightings': + context = {'message': 'Writing Sightings Pages to Disk'} + sightings_builder() elif section == 'src': context = {'message': 'Writing src section to Disk'} src_builder() diff --git a/app/sightings/build.py b/app/sightings/build.py index 565b675..97eecd5 100644 --- a/app/sightings/build.py +++ b/app/sightings/build.py @@ -3,19 +3,19 @@ from django.urls import reverse from builder.base import BuildNew -class BuildBirds(BuildNew): +class BuildSightings(BuildNew): def build(self): self.build_detail_view() self.build_list_view( - base_path=reverse("birds:list_redirect"), + base_path=reverse("sightings:list"), paginate_by=24 ) - print("building birds") + print("building sightings") def get_model_queryset(self): return self.model.objects.all() def builder(): - j = BuildBirds("birds", "birdsighting") + j = BuildSightings("ap", "sighting") j.build() diff --git a/design/templates/admin/buttons.html b/design/templates/admin/buttons.html index efda0b4..013565e 100644 --- a/design/templates/admin/buttons.html +++ b/design/templates/admin/buttons.html @@ -50,7 +50,7 @@
  • Build Photo Galleries
  • Build Project Pages
  • Build Books
  • -
  • Build Birds
  • +
  • Build Sightings
  • Build Resume
  • Build src
  • Build Figments
  • diff --git a/design/templates/admin/index.html b/design/templates/admin/index.html index 54f9798..ef65066 100644 --- a/design/templates/admin/index.html +++ b/design/templates/admin/index.html @@ -44,8 +44,8 @@ td, th { Add - bird sighting - Add + sighting + Add check in diff --git a/design/templates/details/entry.html b/design/templates/details/entry.html index b2a1058..df88bd4 100644 --- a/design/templates/details/entry.html +++ b/design/templates/details/entry.html @@ -53,12 +53,12 @@ class="{%if t == 1 or t == 3 or t == 5 %}double{%else%}single{%endif%}{%if t ==
    {{object.body_html|safe|smartypants|widont}}
    -