Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use context lang for get_all_doc_versions

  • Loading branch information...
commit bd9fd41dec21ee4a7000589b13390db3367ad750 1 parent fe953a2
Claude Paroz claudep authored
Showing with 2 additions and 3 deletions.
  1. +2 −3 docs/templatetags/docs.py
5 docs/templatetags/docs.py
View
@@ -38,8 +38,6 @@ def handle(cls, parser, token):
def __init__(self, docurl, asvar):
self.docurl = template.Variable(docurl)
self.asvar = asvar
- # FIXME
- self.lang = 'en'
def render(self, context):
try:
@@ -48,9 +46,10 @@ def render(self, context):
return ''
versions = []
+ lang = context.get('lang', 'en')
# Look for each version of the docs.
- for release in DocumentRelease.objects.filter(lang=self.lang):
+ for release in DocumentRelease.objects.filter(lang=lang):
version_root = get_doc_root(release.lang, release.version)
if version_root.exists():
doc_path = get_doc_path(version_root, url)
Please sign in to comment.
Something went wrong with that request. Please try again.