summaryrefslogtreecommitdiff
path: root/docs/_ext/djangodocs.py
diff options
context:
space:
mode:
authorLuke Plant <L.Plant.98@cantab.net>2010-11-06 17:42:21 +0000
committerLuke Plant <L.Plant.98@cantab.net>2010-11-06 17:42:21 +0000
commit57f49453c75c92cb6a87bafd48b18ec4efd06255 (patch)
treed95490ab0b6eb491a75e44147257f62629b83ab2 /docs/_ext/djangodocs.py
parent0b2fef5dd350c472f7d76fc4c85a47f3bd8ccc75 (diff)
downloaddjango-57f49453c75c92cb6a87bafd48b18ec4efd06255.tar.gz
Fixed hyperlinking of template tags/filters in offline docs so that non-builtin tags/filters are not hyperlinked to a page where no docs for them exist
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14477 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/_ext/djangodocs.py')
-rw-r--r--docs/_ext/djangodocs.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/docs/_ext/djangodocs.py b/docs/_ext/djangodocs.py
index 022ec3acd3..7f642592a5 100644
--- a/docs/_ext/djangodocs.py
+++ b/docs/_ext/djangodocs.py
@@ -240,9 +240,13 @@ class DjangoStandaloneHTMLBuilder(StandaloneHTMLBuilder):
return
self.info(bold("writing templatebuiltins.js..."))
try:
- xrefs = self.env.reftargets.keys()
- templatebuiltins = dict([('ttags', [n for (t,n) in xrefs if t == 'ttag']),
- ('tfilters', [n for (t,n) in xrefs if t == 'tfilter'])])
+ xrefs = self.env.reftargets.items()
+ templatebuiltins = dict([('ttags', [n for ((t,n),(l,a)) in xrefs
+ if t == 'ttag' and
+ l == 'ref/templates/builtins']),
+ ('tfilters', [n for ((t,n),(l,a)) in xrefs
+ if t == 'tfilter' and
+ l == 'ref/templates/builtins'])])
except AttributeError:
xrefs = self.env.domaindata["std"]["objects"]
templatebuiltins = dict([('ttags', [n for (t,n) in xrefs if t == 'templatetag']),