Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[djangoproject.com] Expose objects.inv for intersphinx links. Fixes #…

…10315.

git-svn-id: http://code.djangoproject.com/svn/djangoproject.com@10069 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit afb08aa5e21cd831e24ce2189b73a1d2a37584e9 1 parent 48a9cf0
authored March 16, 2009
5  djangodocs/urls.py
@@ -22,6 +22,11 @@
22 22
         name = 'document-search',
23 23
     ),
24 24
     url(
  25
+        r'^(?P<lang>[a-z-]+)/(?P<version>[\w.-]+)/_objects/$',
  26
+        djangodocs.views.objects_inventory,
  27
+        name = 'objects-inv',
  28
+    ),
  29
+    url(
25 30
         r'^(?P<lang>[a-z-]+)/(?P<version>[\w.-]+)/_images/(?P<path>.*)$',
26 31
         djangodocs.views.images,
27 32
     ),
11  djangodocs/views.py
... ...
@@ -1,4 +1,3 @@
1  
-import cPickle as pickle
2 1
 import datetime
3 2
 import django.views.static
4 3
 from django.conf import settings
@@ -75,6 +74,16 @@ def source(request, lang, version, path):
75 74
         document_root = docroot.child('_sources'),
76 75
         path = path,
77 76
     )
  77
+    
  78
+def objects_inventory(request, lang, version):
  79
+    docroot = get_docroot(lang, version)
  80
+    response = django.views.static.serve(
  81
+        request, 
  82
+        document_root = docroot,
  83
+        path = "objects.inv",
  84
+    )
  85
+    response['Content-Type'] = "text/plain"
  86
+    return response
78 87
 
79 88
 def search(request, lang, version):
80 89
     docroot = get_docroot(lang, version)

0 notes on commit afb08aa

Please sign in to comment.
Something went wrong with that request. Please try again.