diff options
author | 2022-10-29 10:40:34 +0800 | |
---|---|---|
committer | 2023-05-06 11:04:37 +0200 | |
commit | e3dcb3e0e965a583c1cb2257207a481800966e1a (patch) | |
tree | 1d77331a0a49700c4b1291c052958afb824d8500 /pydis_site/apps/content | |
parent | Put 'Edit on GitHub' on breadcrum row with Sub-Articles dropdown (diff) |
Simplify line in page_src_url template filter
Diffstat (limited to 'pydis_site/apps/content')
-rw-r--r-- | pydis_site/apps/content/templatetags/page_src.py | 5 |
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 |