Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[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
jacob authored
Showing with 15 additions and 1 deletion.
  1. +5 −0 djangodocs/urls.py
  2. +10 −1 djangodocs/views.py
View
5 djangodocs/urls.py
@@ -22,6 +22,11 @@
name = 'document-search',
),
url(
+ r'^(?P<lang>[a-z-]+)/(?P<version>[\w.-]+)/_objects/$',
+ djangodocs.views.objects_inventory,
+ name = 'objects-inv',
+ ),
+ url(
r'^(?P<lang>[a-z-]+)/(?P<version>[\w.-]+)/_images/(?P<path>.*)$',
djangodocs.views.images,
),
View
11 djangodocs/views.py
@@ -1,4 +1,3 @@
-import cPickle as pickle
import datetime
import django.views.static
from django.conf import settings
@@ -75,6 +74,16 @@ def source(request, lang, version, path):
document_root = docroot.child('_sources'),
path = path,
)
+
+def objects_inventory(request, lang, version):
+ docroot = get_docroot(lang, version)
+ response = django.views.static.serve(
+ request,
+ document_root = docroot,
+ path = "objects.inv",
+ )
+ response['Content-Type'] = "text/plain"
+ return response
def search(request, lang, version):
docroot = get_docroot(lang, version)
Please sign in to comment.
Something went wrong with that request. Please try again.