summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorDheerendra Rathor <dheeru.rathor14@gmail.com>2015-10-13 12:22:49 +0530
committerTim Graham <timograham@gmail.com>2015-10-22 13:51:00 -0400
commit59e85f09c6c8171d5b24290d455e351063d81f5a (patch)
tree28a34fd9c29e7f252b62dddd5b3adc79a62ba7b0 /docs
parent3f300efede9f9670f4c413ff85ad731def15992b (diff)
Fixed #25519 -- Made the admin "View site" link point to sites running on a subpath.
Used request.META['SCRIPT_NAME'] as the site_url if it hasn't been customized from the default value of '/'.
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/contrib/admin/index.txt9
-rw-r--r--docs/releases/1.10.txt4
2 files changed, 12 insertions, 1 deletions
diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt
index 6916498660..0d1c3fc305 100644
--- a/docs/ref/contrib/admin/index.txt
+++ b/docs/ref/contrib/admin/index.txt
@@ -2513,6 +2513,15 @@ Templates can override or extend base admin templates as described in
The URL for the "View site" link at the top of each admin page. By default,
``site_url`` is ``/``. Set it to ``None`` to remove the link.
+ For sites running on a subpath, the :meth:`each_context` method checks if
+ the current request has ``request.META['SCRIPT_NAME']`` set and uses that
+ value if ``site_url`` isn't set to something other than ``/``.
+
+ .. versionchanged:: 1.10
+
+ The ``SCRIPT_NAME`` support described in the previous paragraph was
+ added.
+
.. attribute:: AdminSite.index_title
The text to put at the top of the admin index page (a string). By default,
diff --git a/docs/releases/1.10.txt b/docs/releases/1.10.txt
index ebfae18f24..c955b7764d 100644
--- a/docs/releases/1.10.txt
+++ b/docs/releases/1.10.txt
@@ -32,7 +32,9 @@ Minor features
:mod:`django.contrib.admin`
^^^^^^^^^^^^^^^^^^^^^^^^^^^
-* ...
+* For sites running on a subpath, the default :attr:`URL for the "View site"
+ link <django.contrib.admin.AdminSite.site_url>` at the top of each admin page
+ will now point to ``request.META['SCRIPT_NAME']`` if set, instead of ``/``.
:mod:`django.contrib.admindocs`
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^