diff --git a/django/contrib/admin/templates/admin_doc/bookmarklets.html b/django/contrib/admin/templates/admin_doc/bookmarklets.html index 6525014437..94122d0387 100644 --- a/django/contrib/admin/templates/admin_doc/bookmarklets.html +++ b/django/contrib/admin/templates/admin_doc/bookmarklets.html @@ -16,16 +16,16 @@ your computer is "internal").

{% endblocktrans %}
-

{% trans "Documentation for this page" %}

+

{% trans "Documentation for this page" %}

{% trans "Jumps you from any page to the documentation for the view that generates that page." %}

{% trans "Show object ID" %}

{% trans "Shows the content-type and unique ID for pages that represent a single object." %}

-

{% trans "Edit this object (current window)" %}

+

{% trans "Edit this object (current window)" %}

{% trans "Jumps to the admin page for pages that represent a single object." %}

-

{% trans "Edit this object (new window)" %}

+

{% trans "Edit this object (new window)" %}

{% trans "As above, but opens the admin page in a new window." %}

diff --git a/django/contrib/admin/views/doc.py b/django/contrib/admin/views/doc.py index 3a36582326..5d73933139 100644 --- a/django/contrib/admin/views/doc.py +++ b/django/contrib/admin/views/doc.py @@ -19,8 +19,10 @@ def doc_index(request): doc_index = staff_member_required(doc_index) def bookmarklets(request): + # Hack! This couples this view to the URL it lives at. + admin_root = request.path[:-len('doc/bookmarklets/')] return render_to_response('admin_doc/bookmarklets', { - 'admin_url': "%s://%s" % (os.environ.get('HTTPS') == 'on' and 'https' or 'http', request.META['HTTP_HOST']), + 'admin_url': "%s://%s%s" % (os.environ.get('HTTPS') == 'on' and 'https' or 'http', request.META['HTTP_HOST'], admin_root), }, context_instance=DjangoContext(request)) bookmarklets = staff_member_required(bookmarklets)