diff options
author | 2022-10-29 10:37:45 +0800 | |
---|---|---|
committer | 2023-05-06 11:04:36 +0200 | |
commit | a34ebfa67838acac9f2651d7eba7a7472a4bd4ec (patch) | |
tree | 5c156ae5da1e893f584108c52a9ac6072f72865c /pydis_site/apps | |
parent | Edit on GitHub link instead of button (diff) |
Use content articles source url in django.conf.settings
Diffstat (limited to 'pydis_site/apps')
-rw-r--r-- | pydis_site/apps/content/templatetags/page_src.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pydis_site/apps/content/templatetags/page_src.py b/pydis_site/apps/content/templatetags/page_src.py index 33f24b82..3a8f1e8b 100644 --- a/pydis_site/apps/content/templatetags/page_src.py +++ b/pydis_site/apps/content/templatetags/page_src.py @@ -1,4 +1,5 @@ from django import template +from django.conf import settings register = template.Library() @@ -16,7 +17,7 @@ def page_src_url(request_path: str) -> str: """ src_url = request_path.replace( "/pages/", - "https://github.com/python-discord/site/tree/main/pydis_site/apps/content/resources/", + settings.CONTENT_SRC_URL, ) src_url = src_url[:-1] + ".md" return src_url |