diff options
| author | Bobby <[email protected]> | 2023-01-30 01:21:58 -0500 |
|---|---|---|
| committer | Bobby <[email protected]> | 2023-01-30 01:21:58 -0500 |
| commit | 593e140a7ef0ca04550e3eaa3ba31d429bd62fca (patch) | |
| tree | 586680246d77d0c79a058ea5cf5a06e2d38ec9b8 | |
| parent | 71c2f0627dd0b0cb8e4a2073866a85345e21bffe (diff) | |
| download | thatcomputerscientist-593e140a7ef0ca04550e3eaa3ba31d429bd62fca.tar.xz thatcomputerscientist-593e140a7ef0ca04550e3eaa3ba31d429bd62fca.zip | |
error function update for articles
| -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 |
