diff --git a/core/views/uploads.py b/core/views/uploads.py index 8b9656e..7ac43b5 100644 --- a/core/views/uploads.py +++ b/core/views/uploads.py @@ -243,9 +243,11 @@ def logbookedit(request, year=None, slug=None): No check is done on the other people on the trip as this is picked up anyway by parsing on import and we don't really care at this point. - If the author name is mispelled, noticed, and chnaged, then two logbook entries are created + If the author name is mispelled, noticed, and changed, then two logbook entries are created with sequential slugs ...b ...c etc. This is because we are doing validation on GET not on POST and we are not rewriting the URL when a slug gets set. Hmm. + + Normal use of this form is producing duplicate logbook entries.. why ?! """ def validate_year(year): try: @@ -358,6 +360,7 @@ def logbookedit(request, year=None, slug=None): print(f"- Rewriting the entire {year} logbook to disc ") filename= "logbook.html" try: + print(f" - Logbook for {year} to be exported and written out.") writelogbook(year, filename) # uses a template, not the code fragment below which is just a visible hint to logged on user except: message = f'! - Logbook saving failed - \n!! Permissions failure ?! on attempting to save file "logbook.html"' diff --git a/templates/logbook2005style.html b/templates/logbook2005style.html index 9900aed..a1aeb67 100644 --- a/templates/logbook2005style.html +++ b/templates/logbook2005style.html @@ -22,7 +22,7 @@ See troggle/code/views/other.py and core.models/logbooks.py writelogbook(year, f
{{logbook_entry.date|date:'Y-m-d'}}
-
{% for personlogentry in logbook_entry.personlogentry_set.all %}{% if personlogentry.is_logbook_entry_author %}{% if personlogentry.nickname_used %}{{personlogentry.nickname_used|safe}}{% else %}{{personlogentry.personexpedition.person|safe}}{% endif %}{% else %}{% if personlogentry.nickname_used %}{{personlogentry.nickname_used|safe}}{% else %}{{personlogentry.personexpedition.person|safe}}{% endif %}{% endif %}, {% endfor %}{% if logbook_entry.other_people %}, {{logbook_entry.other_people}}{% endif %}
+
{% for personlogentry in logbook_entry.personlogentry_set.all %}{% if personlogentry.is_logbook_entry_author %}{% if personlogentry.nickname_used %}{{personlogentry.nickname_used|safe}}{% else %}{{personlogentry.personexpedition.person|safe}}{% endif %},{% endif %}{% endfor %}{% for personlogentry in logbook_entry.personlogentry_set.all %}{% if personlogentry.is_logbook_entry_author %}{% else %}{% if personlogentry.nickname_used %}{{personlogentry.nickname_used|safe}}{% else %}{{personlogentry.personexpedition.person|safe}}{% endif %}{% endif %},{% endfor %}{% if logbook_entry.other_people %}, {{logbook_entry.other_people}}{% endif %}
{{logbook_entry.title|safe}}
{{logbook_entry.text|safe}}
T/U: {{logbook_entry.time_underground|safe}} hours