From 593e140a7ef0ca04550e3eaa3ba31d429bd62fca Mon Sep 17 00:00:00 2001 From: Bobby Date: Mon, 30 Jan 2023 01:21:58 -0500 Subject: error function update for articles --- thatcomputerscientist/error_handler.py | 1 + 1 file changed, 1 insertion(+) diff --git a/thatcomputerscientist/error_handler.py b/thatcomputerscientist/error_handler.py index b32f1098..32845df4 100644 --- a/thatcomputerscientist/error_handler.py +++ b/thatcomputerscientist/error_handler.py @@ -40,6 +40,7 @@ def custom_404(request, exception): if (re.fullmatch(r'[\w-]+', path) or re.fullmatch(r'articles/[\w-]+', path)) and '-' in path: context['mode'] = 'article' + path = path.replace('articles/', '') if path.startswith('articles/') else path similar_posts = get_similar_posts(path) if similar_posts: context['similar_posts'] = similar_posts -- cgit v1.2.3