aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBobby <[email protected]>2023-03-10 00:05:57 -0500
committerBobby <[email protected]>2023-03-10 00:05:57 -0500
commit286d976dc6cdce95a43cf70db88ad4571d13897a (patch)
treea93095ced0e43b5a9457417aac6bea489992d87c
parent8e5000e31396debf13da969012d1c47886c37524 (diff)
downloadthatcomputerscientist-286d976dc6cdce95a43cf70db88ad4571d13897a.tar.xz
thatcomputerscientist-286d976dc6cdce95a43cf70db88ad4571d13897a.zip
Renamed articles to weblog
-rw-r--r--blog/urls.py10
-rw-r--r--templates/blog/partials/sidebar.html2
-rw-r--r--thatcomputerscientist/error_handler.py4
-rw-r--r--thatcomputerscientist/sitemaps.py4
4 files changed, 10 insertions, 10 deletions
diff --git a/blog/urls.py b/blog/urls.py
index 2b9d64a2..1719f124 100644
--- a/blog/urls.py
+++ b/blog/urls.py
@@ -8,11 +8,11 @@ urlpatterns = [
path('account', views.account, name='account'),
path('register', views.register, name='register'),
path('search', views.search, name='search'),
- path('articles', views.articles, name='articles'),
- path('articles/<str:slug>', views.post, name='post'),
- path('articles/<str:slug>/comment', views.comment, name='comment'),
- path('articles/<str:slug>/edit_comment', views.edit_comment, name='edit_comment'),
- path('articles/<str:slug>/delete_comment/<int:comment_id>', views.delete_comment, name='delete_comment'),
+ path('weblog', views.articles, name='articles'),
+ path('weblog/<str:slug>', views.post, name='post'),
+ path('weblog/<str:slug>/comment', views.comment, name='comment'),
+ path('weblog/<str:slug>/edit_comment', views.edit_comment, name='edit_comment'),
+ path('weblog/<str:slug>/delete_comment/<int:comment_id>', views.delete_comment, name='delete_comment'),
path('archives', views.archives, name='archives'),
path('archives/<str:date>', views.articles, name='archive_posts'),
path('categories', views.categories, name='categories'),
diff --git a/templates/blog/partials/sidebar.html b/templates/blog/partials/sidebar.html
index 948b3aff..eb343898 100644
--- a/templates/blog/partials/sidebar.html
+++ b/templates/blog/partials/sidebar.html
@@ -109,7 +109,7 @@
</span>
<span>
<a href="{% url 'blog:articles' %}">
- Articles
+ Weblog
</a>
</span>
</li>
diff --git a/thatcomputerscientist/error_handler.py b/thatcomputerscientist/error_handler.py
index cec24e83..e04826c5 100644
--- a/thatcomputerscientist/error_handler.py
+++ b/thatcomputerscientist/error_handler.py
@@ -45,9 +45,9 @@ def custom_404(request, exception):
}
path = request.path[1:] if request.path.startswith('/') else request.path
- if (re.fullmatch(r'[\w-]+', path) and '-' in path) or re.fullmatch(r'articles/[\w-]+', path):
+ if (re.fullmatch(r'[\w-]+', path) and '-' in path) or re.fullmatch(r'weblog/[\w-]+', path):
context['mode'] = 'article'
- path = path.replace('articles/', '') if path.startswith('articles/') else path
+ path = path.replace('weblog/', '') if path.startswith('weblog/') else path
similar_posts = get_similar_posts(path)
if similar_posts:
context['similar_posts'] = similar_posts
diff --git a/thatcomputerscientist/sitemaps.py b/thatcomputerscientist/sitemaps.py
index f10baaf4..4703686d 100644
--- a/thatcomputerscientist/sitemaps.py
+++ b/thatcomputerscientist/sitemaps.py
@@ -33,7 +33,7 @@ class CategorySitemap(Sitemap):
return obj.created_at
def location(self, obj):
- return '/articles/categories/%s' % obj.slug
+ return '/weblog/categories/%s' % obj.slug
class TagSitemap(Sitemap):
changefreq = "weekly"
@@ -47,7 +47,7 @@ class TagSitemap(Sitemap):
return obj.created_at
def location(self, obj):
- return '/articles/tags/%s' % obj.slug
+ return '/weblog/tags/%s' % obj.slug
class StaticViewSitemap(Sitemap):
changefreq = "always"