diff options
author | 2020-10-05 16:44:39 +0300 | |
---|---|---|
committer | 2020-10-05 16:44:39 +0300 | |
commit | 483c710595feb69b574a4ae24d94fb14a50dfac6 (patch) | |
tree | 7db2af3c30aa15de517033f507d8ae1dc62ac8a5 /pydis_site/apps/content | |
parent | Migrate content system from Python-Markdown to markdown2 (diff) |
Remove last modified field from article
Diffstat (limited to 'pydis_site/apps/content')
-rw-r--r-- | pydis_site/apps/content/views/article.py | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/pydis_site/apps/content/views/article.py b/pydis_site/apps/content/views/article.py index ede3ba43..51c9a199 100644 --- a/pydis_site/apps/content/views/article.py +++ b/pydis_site/apps/content/views/article.py @@ -1,9 +1,5 @@ -import os -from datetime import datetime -from pathlib import Path from typing import Optional -from django.conf import settings from django.core.handlers.wsgi import WSGIRequest from django.http import HttpResponse from django.shortcuts import render @@ -20,15 +16,6 @@ class ArticleView(View): article_result = get_article(article, category) if category is not None: - path = Path( - settings.BASE_DIR, "pydis_site", "apps", "content", "resources", "content", category, f"{article}.md" - ) - else: - path = Path( - settings.BASE_DIR, "pydis_site", "apps", "content", "resources", "content", f"{article}.md" - ) - - if category is not None: category_data = get_category(category) category_data["raw_name"] = category else: @@ -49,7 +36,6 @@ class ArticleView(View): "content/article.html", { "article": article_result, - "last_modified": datetime.fromtimestamp(os.path.getmtime(path)).strftime("%dth %B %Y"), "category_data": category_data, "relevant_links": relevant_links } |