diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-04-19 21:46:51 -0400 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-04-19 21:46:51 -0400 |
commit | ae9ee14ff153698dd90c6560437e42ff124a6d0b (patch) | |
tree | ffd990442f624d5d09282c4ecea064f3ed588e70 /main | |
parent | 9b23e64dde9d218c5dfbc70bf38f5e2afe7e4089 (diff) |
Abstract ArchWiki URLs and references.
Notable things:
* Standardize on "ArchWiki", instead of also having "Arch Wiki", via
BRANDING_WIKINAME
* Link to the article "Install_Guide" instead of
"Official_Arch_Linux_Install_Guide", it's a redirect anyway.
* On the download page, it assumes the that the version is just appended to
the URL for the wiki link.
* For the wiki RSS link, It now uses "/${title}?feed=rss" instead of
"?title=${title}&feed=rss".
Diffstat (limited to 'main')
-rw-r--r-- | main/context_processors.py | 1 | ||||
-rw-r--r-- | main/templatetags/wiki.py | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/main/context_processors.py b/main/context_processors.py index 850bb499..5ac31744 100644 --- a/main/context_processors.py +++ b/main/context_processors.py @@ -7,6 +7,7 @@ def branding(request): 'BRANDING_APPNAME': settings.BRANDING_APPNAME, 'BRANDING_DISTRONAME': settings.BRANDING_DISTRONAME, 'BRANDING_SHORTNAME': settings.BRANDING_SHORTNAME, + 'BRANDING_WIKINAME': settings.BRANDING_WIKINAME, 'BRANDING_EMAIL': settings.BRANDING_EMAIL, } diff --git a/main/templatetags/wiki.py b/main/templatetags/wiki.py new file mode 100644 index 00000000..b1b8dd55 --- /dev/null +++ b/main/templatetags/wiki.py @@ -0,0 +1,9 @@ +from django import template +register = template.Library() + +@register.simple_tag +def wiki_url(article=""): + if article == "": + return "https://wiki.archlinux.org/" + else: + return "https://wiki.archlinux.org/index.php/"+article.replace(' ', '_') |