mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-12-16 10:47:12 +00:00
comments
This commit is contained in:
@@ -213,7 +213,8 @@ def extract_gps(dict):
|
|||||||
print("failed to find latitude")
|
print("failed to find latitude")
|
||||||
|
|
||||||
location = f'<a href="https://www.openstreetmap.org/?mlat={latitude}&mlon={longitude}">{latitude:09.6f} {latref}, {longitude:010.6f} {lonref}</a>'
|
location = f'<a href="https://www.openstreetmap.org/?mlat={latitude}&mlon={longitude}">{latitude:09.6f} {latref}, {longitude:010.6f} {lonref}</a>'
|
||||||
# 3 digits for longitude, 2 for latitude.
|
# 3 digits for longitude (0-359) or +/-(0-180), 2 for latitude +/-(0-90)
|
||||||
|
# we might want to rectify longitude to be always +(0-359)?
|
||||||
print(direction)
|
print(direction)
|
||||||
print(altitude)
|
print(altitude)
|
||||||
print(timestamp_utc)
|
print(timestamp_utc)
|
||||||
|
|||||||
8
urls.py
8
urls.py
@@ -96,6 +96,14 @@ NOTE
|
|||||||
|
|
||||||
- The final _edit and CATCHALL also have to use re_path().
|
- The final _edit and CATCHALL also have to use re_path().
|
||||||
|
|
||||||
|
(?P<thing>)
|
||||||
|
This strange syntax is not a Django funny, it is standard (but obscure) python.
|
||||||
|
It denotes a "Named Capturing Group"
|
||||||
|
https://docs.python.org/3/howto/regex.html#non-capturing-and-named-groups
|
||||||
|
https://dnmtechs.com/understanding-the-django-regular-expression-p-in-python-3/
|
||||||
|
https://www.regular-expressions.info/named.html
|
||||||
|
e.g. the regular expression:
|
||||||
|
r'^(?P<path>.*)/(?P<slug>[^/]+)_cave_edit/$'
|
||||||
|
|
||||||
Many of these patterns do not work because troggle spent many years broken and we have
|
Many of these patterns do not work because troggle spent many years broken and we have
|
||||||
not yet restored all the functions. Some may have never been fully implemented in
|
not yet restored all the functions. Some may have never been fully implemented in
|
||||||
|
|||||||
Reference in New Issue
Block a user