1
0
Fork 0

Generation of slugs and new urls to handle slugs

- TODO: redirect to correct slug if not found.
This commit is contained in:
Vivianne Langdon 2022-03-02 00:21:23 -08:00
parent 0751a56474
commit ebf463fc91
22 changed files with 71 additions and 29 deletions

View file

@ -6,5 +6,6 @@ STRICT_LOCALNAME = r"@[a-zA-Z_\-\.0-9]+"
USERNAME = rf"{LOCALNAME}(@{DOMAIN})?"
STRICT_USERNAME = rf"\B{STRICT_LOCALNAME}(@{DOMAIN})?\b"
FULL_USERNAME = rf"{LOCALNAME}@{DOMAIN}\b"
SLUG = r"/s/(?P<slug>[-_a-z0-9]+)"
# should match (BookWyrm/1.0.0; or (BookWyrm/99.1.2;
BOOKWYRM_USER_AGENT = r"\(BookWyrm/[0-9]+\.[0-9]+\.[0-9]+;"