mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2026-02-08 13:18:15 +00:00
revised tables
This commit is contained in:
@@ -328,6 +328,23 @@ def stations(request):
|
|||||||
|
|
||||||
return render(request, "stations.html", {"ents": ents, "gpsents": gpsents, "stations": stations, "year": current_expo()})
|
return render(request, "stations.html", {"ents": ents, "gpsents": gpsents, "stations": stations, "year": current_expo()})
|
||||||
|
|
||||||
|
def old_key(p):
|
||||||
|
"""This function goes into a lexicographic sort function, and the values are strings,
|
||||||
|
but we want to sort numerically.
|
||||||
|
Skip people who have never been on expo.
|
||||||
|
"""
|
||||||
|
last = p.last()
|
||||||
|
if last:
|
||||||
|
if last.expedition:
|
||||||
|
# print(p,p.last().expedition)
|
||||||
|
return int(p.last().expedition.year)
|
||||||
|
else:
|
||||||
|
print(p,p.last())
|
||||||
|
|
||||||
|
else:
|
||||||
|
print(f"{p} never attended expo")
|
||||||
|
return 2050
|
||||||
|
|
||||||
|
|
||||||
def aliases(request, year):
|
def aliases(request, year):
|
||||||
"""Page which displays a list of all the person aliases in a specific year"""
|
"""Page which displays a list of all the person aliases in a specific year"""
|
||||||
@@ -338,12 +355,16 @@ def aliases(request, year):
|
|||||||
personexpeditions = PersonExpedition.objects.filter(expedition=expo)
|
personexpeditions = PersonExpedition.objects.filter(expedition=expo)
|
||||||
persons = list(Person.objects.all().order_by("last_name"))
|
persons = list(Person.objects.all().order_by("last_name"))
|
||||||
|
|
||||||
|
|
||||||
|
oldpersons = persons
|
||||||
|
oldpersons.sort(key=old_key)
|
||||||
|
print(len(oldpersons))
|
||||||
|
|
||||||
aliases = GetPersonExpeditionNameLookup(expo)
|
aliases = GetPersonExpeditionNameLookup(expo)
|
||||||
|
|
||||||
aliasdict = {}
|
aliasdict = {}
|
||||||
for i in sorted(aliases):
|
for i in sorted(aliases):
|
||||||
aliasdict[i] = aliases[i]
|
aliasdict[i] = aliases[i]
|
||||||
invert = {}
|
|
||||||
|
|
||||||
return render(
|
return render(
|
||||||
request,
|
request,
|
||||||
@@ -352,8 +373,8 @@ def aliases(request, year):
|
|||||||
"year": year,
|
"year": year,
|
||||||
"aliasdict": aliasdict,
|
"aliasdict": aliasdict,
|
||||||
"foreign_friends": foreign_friends,
|
"foreign_friends": foreign_friends,
|
||||||
"invert": invert,
|
|
||||||
"personexpeditions": personexpeditions,
|
"personexpeditions": personexpeditions,
|
||||||
"persons": persons,
|
"persons": persons,
|
||||||
|
"oldpersons": oldpersons,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -26,21 +26,24 @@ td {
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
<p>This is the list of people on expo this year.
|
||||||
<table>
|
<table>
|
||||||
<tr><th>who</th><th>aliases</th></tr>
|
<tr><th>Person</th><th>mugshot</th><th>blurbfile</th></tr>
|
||||||
{% for key, value in invert.items %}
|
{% for pe in personexpeditions %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{key}}</td>
|
<td>{{pe.person}}</td>
|
||||||
<td>{{value}}</td>
|
<td>{% if pe.person.mugshot %}<a href="{{pe.person.mugshot}}">{{pe.person.mugshot}}</a>{% endif %}</td>
|
||||||
|
<td>{% if pe.person.blurbfile %}<a href="{{pe.person.blurbfile}}">{{pe.person.blurbfile}}</a>{% endif %}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<p>The aliases below are specified in the folk.csv file. Only one alias is possible in that format. The specified alias ('nickname')
|
<p>The aliases below are specified in the folk.csv file. Only one alias is possible in that format. The specified alias ('nickname')
|
||||||
is used in the table above to construct possible unambiguous identifiers.
|
is used in the table above to construct possible unambiguous identifiers. This is ordered by the date of last appearance on expo.
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<tr><th>First</th><th>Last</th><th>Full name</th><th>Nickname</th><th>expo first</th><th>expo last</th></tr>
|
<tr><th>First</th><th>Last</th><th>Full name</th><th>Nickname</th><th>expo first</th><th>expo last</th></tr>
|
||||||
{% for p in persons %}
|
{% for p in oldpersons %}
|
||||||
<tr>
|
<tr>
|
||||||
<td><b>{{p.first_name}}</b></td>
|
<td><b>{{p.first_name}}</b></td>
|
||||||
<td><b>{{p.last_name}}</b></td>
|
<td><b>{{p.last_name}}</b></td>
|
||||||
@@ -53,17 +56,7 @@ is used in the table above to construct possible unambiguous identifiers.
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<p>This is the list of people on expo this year.
|
|
||||||
<table>
|
|
||||||
<tr><th>Person</th><th>mugshot</th><th>blurbfile</th></tr>
|
|
||||||
{% for pe in personexpeditions %}
|
|
||||||
<tr>
|
|
||||||
<td>{{pe.person}}</td>
|
|
||||||
<td>{% if pe.person.mugshot %}<a href="{{pe.person.mugshot}}">{{pe.person.mugshot}}</a>{% endif %}</td>
|
|
||||||
<td>{% if pe.person.blurbfile %}<a href="{{pe.person.blurbfile}}">{{pe.person.blurbfile}}</a>{% endif %}</td>
|
|
||||||
</tr>
|
|
||||||
{% endfor %}
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<p>And these are people known to us, who appear as survex *team members or in logbook participant lists, but are not expo members
|
<p>And these are people known to us, who appear as survex *team members or in logbook participant lists, but are not expo members
|
||||||
and so are not managed or reported:
|
and so are not managed or reported:
|
||||||
|
|||||||
Reference in New Issue
Block a user