diff options
| -rw-r--r-- | thatcomputerscientist/error_handler.py | 1 |
1 files changed, 1 insertions, 0 deletions
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 |
