forked from expo/troggle
fix for missing scotsmen
This commit is contained in:
parent
b4ba3c40eb
commit
bad5484d12
@ -119,7 +119,7 @@ def person(request, first_name='', last_name='', ):
|
|||||||
this_person = Person.objects.get(first_name = first_name, last_name = last_name)
|
this_person = Person.objects.get(first_name = first_name, last_name = last_name)
|
||||||
return render(request,'person.html', {'person': this_person, })
|
return render(request,'person.html', {'person': this_person, })
|
||||||
except:
|
except:
|
||||||
message = f'Person not found - possibly Scottish? (We have a name parser issue with Mc, Mac etc.)'
|
message = f'Person not found \'{first_name}-{last_name}\' - possibly Scottish? (We have a name parser issue with Mc, Mac etc.)'
|
||||||
return render(request, 'errors/generic.html', {'message': message})
|
return render(request, 'errors/generic.html', {'message': message})
|
||||||
|
|
||||||
|
|
||||||
|
2
urls.py
2
urls.py
@ -79,7 +79,7 @@ trogglepatterns = [
|
|||||||
# Persons - nasty surname recognition logic fails for 19 people!
|
# Persons - nasty surname recognition logic fails for 19 people!
|
||||||
# re_path(r'^person/(?P<person_id>\d*)/?$', person), makes Ruairidh MacLeod work but kills MacLean
|
# re_path(r'^person/(?P<person_id>\d*)/?$', person), makes Ruairidh MacLeod work but kills MacLean
|
||||||
# re_path(r'^person/(\w+_\w+)$', logbooks.person, name="person"),
|
# re_path(r'^person/(\w+_\w+)$', logbooks.person, name="person"),
|
||||||
re_path(r'^person/(?P<first_name>[A-Z]*[a-z\-\'&;]*)[^a-zA-Z]*(?P<last_name>[a-z\-\']*[^a-zA-Z]*[A-Z]*[a-z\-&;]*)/?', person, name="person"),
|
re_path(r'^person/(?P<first_name>[A-Z]*[a-z\-\'&;]*)[^a-zA-Z]*(?P<last_name>[a-z\-\']*[^a-zA-Z]*[A-Z]*[a-zA-Z\-&;]*)/?', person, name="person"),
|
||||||
re_path(r'^personexpedition/(?P<first_name>[A-Z]*[a-z&;]*)[^a-zA-Z]*(?P<last_name>[A-Z]*[a-zA-Z&;]*)/(?P<year>\d+)/?$', personexpedition, name="personexpedition"),
|
re_path(r'^personexpedition/(?P<first_name>[A-Z]*[a-z&;]*)[^a-zA-Z]*(?P<last_name>[A-Z]*[a-zA-Z&;]*)/(?P<year>\d+)/?$', personexpedition, name="personexpedition"),
|
||||||
|
|
||||||
# Expedition master page
|
# Expedition master page
|
||||||
|
Loading…
Reference in New Issue
Block a user