diff --git a/.gitignore b/.gitignore index 0e3f13b..4228331 100644 --- a/.gitignore +++ b/.gitignore @@ -126,3 +126,4 @@ media/jslib/openlayers/Lang/vi.js media/jslib/openlayers/Lang/zh-CN.js media/jslib/openlayers/Lang/zh-TW.js _test_response.html +_deploy/wsl/localsettingsWSL.py.bak diff --git a/core/views/logbooks.py b/core/views/logbooks.py index 9695d54..6160de4 100644 --- a/core/views/logbooks.py +++ b/core/views/logbooks.py @@ -32,6 +32,9 @@ todo = '''Fix the get_person_chronology() display bug. ''' def notablepersons(request): + def notabilitykey(person): + return person.notability() + persons = Person.objects.all() # From what I can tell, "persons" seems to be the table rows, while "pcols" is the table columns. - AC 16 Feb 09 pcols = [ ] @@ -41,9 +44,11 @@ def notablepersons(request): pcols.append(persons[i * nc: (i + 1) * nc]) notablepersons = [] - for person in Person.objects.all(): - if person.bisnotable(): - notablepersons.append(person) +# Needed recoding because of Django CVE-2021-45116 + for person in persons: + if person.bisnotable(): + notablepersons.append(person) + notablepersons.sort(key=notabilitykey, reverse=True) return render(request,'notablepersons.html', {'persons': persons, 'pcols':pcols, 'notablepersons':notablepersons}) diff --git a/templates/notablepersons.html b/templates/notablepersons.html index 99dce30..4485dd9 100644 --- a/templates/notablepersons.html +++ b/templates/notablepersons.html @@ -2,21 +2,27 @@ {% block title %}Person Index{% endblock %} {% block content %} +
This table is just for fun. And it's apparently not working (boo) in April 2022.
Person | First | Last | Recency |
---|---|---|---|
{{person|safe}} | {{ person.first.expedition.year }} | {{ person.last.expedition.year }} | {{person.notability|floatformat:2}} | No one is notable | + {% endfor %} |
This is based purely on attendance, not on activities, surveying or usefulness of any kind. But as Woody Allen said: "90% of success is just turning up". This is mostly people who have been within the past three years, with an additional bias for number of attendances since 1976. The metric is just a geometric "recency" (1/2 for attending last year, 1/3 for the year before, etc., added up.) The display cuttoff is 1/3 so if you came just once, three years ago, you are on the list. +
This is based purely on attendance, not on activities, surveying or usefulness of any kind. +But as Woody Allen said: "90% of success is just turning up". +This is mostly people who have been within the past three years, with an additional bias for number of attendances since 1976. +The metric is just a geometric "recency" (1/2 for attending last year, 1/3 for the year before, etc., added up.) +The display cuttoff is 1/3 so if you came just once, three years ago, you are on the list.