From f6a8f16c61e1694aa60c5270b52caece4bd37bcc Mon Sep 17 00:00:00 2001
From: merlin
to local social service agencies that feed the food insecure.
- Sign up on the Food Rescue DC website.
+ Sign up on the
+ Food Rescue DC website.
Make food rescue rides, tag them with #foodrescue
. If
you make multiple rescues on one ride, append the number of rescues
to the tag with an x
like so:
#foodrescuex2
.
See: {{ url }} diff --git a/freezing/web/views/general.py b/freezing/web/views/general.py index 61409411..9549caeb 100644 --- a/freezing/web/views/general.py +++ b/freezing/web/views/general.py @@ -38,18 +38,17 @@ class AccessDenied(RuntimeError): # When a hashtag has a "/pointless/*" route instead of "/pointless/hashtag/*". # Many of the generic leaderboards ought to be pure hashtag leaderboards. custom_tag_pages = { + "adulting": "generic/adulting", "civilwarmarker": "civilwarhistory", "civilwarstreet": "civilwarhistory", "coffeeride": "coffeeride", + "decasleaze": "generic/decasleaze", "foodrescue": "foodrescue", - "kidical": "kidmiles", - "withkid": "pointlesskids", - "rosshillloop": "rosshillloop", - "adulting": "generic/adulting", "freezingerrands": "generic/adulting", - "londonbridge": "generic/londonbridge", "fsrealsuppleride": "generic/suppleride", - "decasleaze": "generic/decasleaze", + "kidical": "kidmiles", + "londonbridge": "generic/londonbridge", + "rosshillloop": "rosshillloop", "withkid": "pointlesskids", } @@ -163,8 +162,8 @@ def index(): for res in meta.scoped_session().execute(q).fetchall(): ride_tags = {} # Prevent double-tagging for hash in findall(r"(?<=#)\w+", res["name"]): - if hash.lower().startswith("withkid"): - hash = "withkid" + desuffix = fullmatch(r"(?i)(withkid|foodrescue).*", hash) + hash = desuffix[1] if desuffix else hash if not fullmatch( r"(?i)(BAFS|FS|FreezingSaddles)?\d*", hash ): # Ditch useless tags