Author: lukeplant
Date: 2010-11-06 12:42:21 -0500 (Sat, 06 Nov 2010)
New Revision: 14477

Modified:
   django/trunk/docs/_ext/djangodocs.py
Log:
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

Modified: django/trunk/docs/_ext/djangodocs.py
===================================================================
--- django/trunk/docs/_ext/djangodocs.py        2010-11-06 16:41:53 UTC (rev 
14476)
+++ django/trunk/docs/_ext/djangodocs.py        2010-11-06 17:42:21 UTC (rev 
14477)
@@ -240,9 +240,13 @@
             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']),

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to