aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar hedy <[email protected]>2022-10-29 10:40:34 +0800
committerGravatar Johannes Christ <[email protected]>2023-05-06 11:04:37 +0200
commite3dcb3e0e965a583c1cb2257207a481800966e1a (patch)
tree1d77331a0a49700c4b1291c052958afb824d8500
parentPut 'Edit on GitHub' on breadcrum row with Sub-Articles dropdown (diff)
Simplify line in page_src_url template filter
-rw-r--r--pydis_site/apps/content/templatetags/page_src.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/pydis_site/apps/content/templatetags/page_src.py b/pydis_site/apps/content/templatetags/page_src.py
index 3a8f1e8b..261abbdf 100644
--- a/pydis_site/apps/content/templatetags/page_src.py
+++ b/pydis_site/apps/content/templatetags/page_src.py
@@ -15,9 +15,6 @@ def page_src_url(request_path: str) -> str:
For example: /pages/rules/ would return:
https://github.com/python-discord/site/tree/main/pydis_site/apps/content/resources/rules.md
"""
- src_url = request_path.replace(
- "/pages/",
- settings.CONTENT_SRC_URL,
- )
+ src_url = request_path.replace("/pages/", settings.CONTENT_SRC_URL)
src_url = src_url[:-1] + ".md"
return src_url