mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-12-16 23:27:08 +00:00
tick boxes meddling
This commit is contained in:
@@ -381,7 +381,9 @@ class Wallet(models.Model):
|
|||||||
survexok = "green"
|
survexok = "green"
|
||||||
ticks["S"] = "green"
|
ticks["S"] = "green"
|
||||||
else:
|
else:
|
||||||
if waldata["survex file"]:
|
if "survex file" not in waldata:
|
||||||
|
ticks["S"] = "darkred"
|
||||||
|
else:
|
||||||
if not type(waldata["survex file"]) == list: # a string also is a sequence type, so do it this way
|
if not type(waldata["survex file"]) == list: # a string also is a sequence type, so do it this way
|
||||||
waldata["survex file"] = [waldata["survex file"]]
|
waldata["survex file"] = [waldata["survex file"]]
|
||||||
ngood = 0
|
ngood = 0
|
||||||
@@ -403,7 +405,7 @@ class Wallet(models.Model):
|
|||||||
elif nbad >= 1 and ngood == 0: # all bad
|
elif nbad >= 1 and ngood == 0: # all bad
|
||||||
ticks["S"] = "red"
|
ticks["S"] = "red"
|
||||||
elif nbad == 0 and ngood == 0: # list of blank strings
|
elif nbad == 0 and ngood == 0: # list of blank strings
|
||||||
ticks["S"] = "red"
|
ticks["S"] = "crimson"
|
||||||
else:
|
else:
|
||||||
ticks["S"] = "fuchsia" # have fun working out what this means
|
ticks["S"] = "fuchsia" # have fun working out what this means
|
||||||
|
|
||||||
|
|||||||
@@ -256,6 +256,8 @@ def tidy_trip_image_urls(text, date):
|
|||||||
text = text.replace(f' src="/years/{y}//years/{y}/', f' src="/years/{y}/')
|
text = text.replace(f' src="/years/{y}//years/{y}/', f' src="/years/{y}/')
|
||||||
text = text.replace(f" src='/years/{y}//years/{y}/", f" src='/years/{y}/")
|
text = text.replace(f" src='/years/{y}//years/{y}/", f" src='/years/{y}/")
|
||||||
|
|
||||||
|
text = text.replace(f'http://expo.survex.com/expofiles', f'/expofiles')
|
||||||
|
|
||||||
text = text.replace(f' src="/years/{y}//expofiles/', f' src="/expofiles/')
|
text = text.replace(f' src="/years/{y}//expofiles/', f' src="/expofiles/')
|
||||||
text = text.replace(f" src='/years/{y}//expofiles/", f" src='/expofiles/")
|
text = text.replace(f" src='/years/{y}//expofiles/", f" src='/expofiles/")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user