mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
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 '/'.
This commit is contained in:
parent
3f300efede
commit
59e85f09c6
4 changed files with 23 additions and 2 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue