﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
29030	"Make construction of ""View on site"" and ""View Site"" URLs consistent"	Kaleb Hornsby	Pierre Sassoulas	"The [https://docs.djangoproject.com/en/dev/ref/contrib/sites/#how-django-uses-the-sites-framework How Django Uses the Sites Framework] documentation states the following:

    In the admin framework, the “view on site” link uses the current [https://docs.djangoproject.com/en/dev/ref/contrib/sites/#django.contrib.sites.models.Site Site] to work out the domain for the site that it will redirect to.

This statement seems to be false. In [https://docs.djangoproject.com/en/2.0/ref/contrib/admin/#django.contrib.admin.AdminSite.site_url the admin site docs], it states the following:

    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 `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 `/`.

This seems to be backed up by what I am actually seeing, and what the code says that it is doing. Changing the current site's domain in the sites framework has no effect on this link. I suggest removing the incorrect information from the sites documentation. The alternative would be to add this functionality to the admin site."	Cleanup/optimization	assigned	contrib.admin	2.0	Normal				Accepted	1	0	0	0	0	0
