mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2024-11-22 07:11:52 +00:00
CLean up accented names display
This commit is contained in:
parent
ad2d25ed00
commit
21e0700b8d
@ -153,11 +153,8 @@ class QMs_jsonListView(ListView):
|
|||||||
template_name = "core/QMs_json_list.html"
|
template_name = "core/QMs_json_list.html"
|
||||||
model = QM
|
model = QM
|
||||||
|
|
||||||
rx_person = re.compile(r"(?i)^(([A-Z]*[a-z\-\'&;]*)[^a-zA-Z]*)([a-z\-\']*[^a-zA-Z]*[\-]*[A-Z]*[a-zA-Z\-&;]*)$")
|
|
||||||
rx_simple_person = re.compile(r"^([A-Z][a-z]*)[ ]*([A-Z][a-z]*)$")
|
|
||||||
|
|
||||||
def person(request, slug=""):
|
def person(request, slug=""):
|
||||||
"""Original code as it has been for years. Trying to replace with better_person
|
"""Now very much simpler with an unambiguous slug
|
||||||
"""
|
"""
|
||||||
this_person = Person.objects.get(slug=slug)
|
this_person = Person.objects.get(slug=slug)
|
||||||
return render(request, "person.html", {"person": this_person})
|
return render(request, "person.html", {"person": this_person})
|
||||||
@ -197,6 +194,7 @@ def get_person_chronology(personexpedition):
|
|||||||
|
|
||||||
|
|
||||||
def personexpedition(request, slug="", year=""):
|
def personexpedition(request, slug="", year=""):
|
||||||
|
try:
|
||||||
person = Person.objects.get(slug=slug)
|
person = Person.objects.get(slug=slug)
|
||||||
this_expedition = Expedition.objects.get(year=year)
|
this_expedition = Expedition.objects.get(year=year)
|
||||||
personexpedition = person.personexpedition_set.get(expedition=this_expedition)
|
personexpedition = person.personexpedition_set.get(expedition=this_expedition)
|
||||||
@ -205,6 +203,10 @@ def personexpedition(request, slug="", year=""):
|
|||||||
return render(
|
return render(
|
||||||
request, "personexpedition.html", {"personexpedition": personexpedition, "personchronology": personchronology}
|
request, "personexpedition.html", {"personexpedition": personexpedition, "personchronology": personchronology}
|
||||||
)
|
)
|
||||||
|
except:
|
||||||
|
msg = f" Person '{slug=}' or year '{year=}' not found in database. Please report this to a nerd."
|
||||||
|
print(msg)
|
||||||
|
return render(request, "errors/generic.html", {"message": msg})
|
||||||
|
|
||||||
|
|
||||||
def logbookentry(request, date, slug):
|
def logbookentry(request, date, slug):
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</p>
|
</p>
|
||||||
<p>Status of all wallets for <b>
|
<p>Status of all wallets for <b>
|
||||||
<a href="/wallets/person/{{personexpedition.person.slug}}">{{personexpedition.person.fullname}}</a>
|
<a href="/wallets/person/{{personexpedition.person.slug}}">{{personexpedition.person.fullname|safe}}</a>
|
||||||
</b>
|
</b>
|
||||||
</p>
|
</p>
|
||||||
<h3>Table of all trips and surveys aligned by date</h3>
|
<h3>Table of all trips and surveys aligned by date</h3>
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
{% block title %}One Person Survey scans folders (wallets){% endblock %}
|
{% block title %}One Person Survey scans folders (wallets){% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h3>Wallets for <a href="{{person.get_absolute_url}}">{{person.fullname}}</a> </h3>
|
<h3>Wallets for <a href="{{person.get_absolute_url}}">{{person.fullname|safe}}</a> </h3>
|
||||||
<p>Each wallet contains the scanned original in-cave survey notes and sketches of
|
<p>Each wallet contains the scanned original in-cave survey notes and sketches of
|
||||||
plans and elevations. It also contains scans of centre-line survex output on which
|
plans and elevations. It also contains scans of centre-line survex output on which
|
||||||
hand-drawn passage sections are drawn. These hand-drawn passages will eventually be
|
hand-drawn passage sections are drawn. These hand-drawn passages will eventually be
|
||||||
|
Loading…
Reference in New Issue
Block a user