aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBobby <[email protected]>2023-01-30 01:18:24 -0500
committerBobby <[email protected]>2023-01-30 01:18:24 -0500
commit71c2f0627dd0b0cb8e4a2073866a85345e21bffe (patch)
tree536a9131f45608ae993450b51b048776e36bc5b8
parent75302ee8af337d1f4dd910fec99e857a9aa7a3c9 (diff)
downloadthatcomputerscientist-71c2f0627dd0b0cb8e4a2073866a85345e21bffe.tar.xz
thatcomputerscientist-71c2f0627dd0b0cb8e4a2073866a85345e21bffe.zip
added sitemap and renamed error function
-rw-r--r--templates/blog/partials/base.html2
-rw-r--r--thatcomputerscientist/error_handler.py2
-rw-r--r--thatcomputerscientist/urls.py2
3 files changed, 3 insertions, 3 deletions
diff --git a/templates/blog/partials/base.html b/templates/blog/partials/base.html
index c7ef3b92..2f395b1b 100644
--- a/templates/blog/partials/base.html
+++ b/templates/blog/partials/base.html
@@ -58,7 +58,7 @@
<p style="text-align: center">
<b>PS:</b> The ads shown on this website are fake and purely for
aesthetic purposes. I do not earn any money from them, neither clicking
- them will redirect you to any other website. If you have any questions, comments, or concerns about how this site operates and how your data is handled, please check out the <a href="{% url 'blog:policy' %}">site policy</a> page.
+ them will redirect you to any other website. If you have any questions, comments, or concerns about how this site operates and how your data is handled, please check out the <a href="{% url 'blog:policy' %}">site policy</a> page. View <a href="{% url 'django.contrib.sitemaps.views.sitemap' %}">Sitemap</a>.
</p>
</div>
</div>
diff --git a/thatcomputerscientist/error_handler.py b/thatcomputerscientist/error_handler.py
index 720681a7..b32f1098 100644
--- a/thatcomputerscientist/error_handler.py
+++ b/thatcomputerscientist/error_handler.py
@@ -30,7 +30,7 @@ def get_similar_users(username):
return similar_users
-def _404(request, exception):
+def custom_404(request, exception):
# Your custom 404 view logic here
context = {
'mode': 'generic',
diff --git a/thatcomputerscientist/urls.py b/thatcomputerscientist/urls.py
index 8335918e..373a4358 100644
--- a/thatcomputerscientist/urls.py
+++ b/thatcomputerscientist/urls.py
@@ -28,7 +28,7 @@ sitemaps = {
'github': GithubSitemap,
}
-handler404 = 'thatcomputerscientist.error_handler._404'
+handler404 = 'thatcomputerscientist.error_handler.custom_404'
urlpatterns = [
path('admin/', admin.site.urls),