mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2024-11-28 10:02:10 +00:00
fixed orde rof author and others in log
This commit is contained in:
parent
afa8ff4f66
commit
c95d861516
@ -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"'
|
||||
|
@ -22,7 +22,7 @@ See troggle/code/views/other.py and core.models/logbooks.py writelogbook(year, f
|
||||
<hr />
|
||||
|
||||
<div class="tripdate" id="{{logbook_entry.slug}}">{{logbook_entry.date|date:'Y-m-d'}}</div>
|
||||
<div class="trippeople">{% for personlogentry in logbook_entry.personlogentry_set.all %}{% if personlogentry.is_logbook_entry_author %}<u>{% if personlogentry.nickname_used %}{{personlogentry.nickname_used|safe}}{% else %}{{personlogentry.personexpedition.person|safe}}{% endif %}</u>{% 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 %}</div>
|
||||
<div class="trippeople">{% for personlogentry in logbook_entry.personlogentry_set.all %}{% if personlogentry.is_logbook_entry_author %}<u>{% if personlogentry.nickname_used %}{{personlogentry.nickname_used|safe}}{% else %}{{personlogentry.personexpedition.person|safe}}{% endif %}</u>,{% 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 %}</div>
|
||||
<div class="triptitle">{{logbook_entry.title|safe}}</div>
|
||||
{{logbook_entry.text|safe}}
|
||||
<div class="timeug">T/U: {{logbook_entry.time_underground|safe}} hours</div>
|
||||
|
Loading…
Reference in New Issue
Block a user