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
This commit is contained in:
parent
0b2fef5dd3
commit
57f49453c7
|
@ -240,9 +240,13 @@ class DjangoStandaloneHTMLBuilder(StandaloneHTMLBuilder):
|
||||||
return
|
return
|
||||||
self.info(bold("writing templatebuiltins.js..."))
|
self.info(bold("writing templatebuiltins.js..."))
|
||||||
try:
|
try:
|
||||||
xrefs = self.env.reftargets.keys()
|
xrefs = self.env.reftargets.items()
|
||||||
templatebuiltins = dict([('ttags', [n for (t,n) in xrefs if t == 'ttag']),
|
templatebuiltins = dict([('ttags', [n for ((t,n),(l,a)) in xrefs
|
||||||
('tfilters', [n for (t,n) in xrefs if t == 'tfilter'])])
|
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:
|
except AttributeError:
|
||||||
xrefs = self.env.domaindata["std"]["objects"]
|
xrefs = self.env.domaindata["std"]["objects"]
|
||||||
templatebuiltins = dict([('ttags', [n for (t,n) in xrefs if t == 'templatetag']),
|
templatebuiltins = dict([('ttags', [n for (t,n) in xrefs if t == 'templatetag']),
|
||||||
|
|
Loading…
Reference in New Issue