Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed hyperlinking of template tags/filters in offline docs so that n…

…on-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
  • Loading branch information...
commit 57f49453c75c92cb6a87bafd48b18ec4efd06255 1 parent 0b2fef5
@spookylukey spookylukey authored
Showing with 7 additions and 3 deletions.
  1. +7 −3 docs/_ext/djangodocs.py
View
10 docs/_ext/djangodocs.py
@@ -240,9 +240,13 @@ def finish(self):
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']),
Please sign in to comment.
Something went wrong with that request. Please try again.