#29030: django.contrib.sites Documnets incorrectly its use in 
django.contrib.admin
"View Site" functionality
-----------------------------------------+------------------------
               Reporter:  Kaleb Hornsby  |          Owner:  nobody
                   Type:  Bug            |         Status:  new
              Component:  Documentation  |        Version:  2.0
               Severity:  Normal         |       Keywords:
           Triage Stage:  Unreviewed     |      Has patch:  0
    Needs documentation:  0              |    Needs tests:  0
Patch needs improvement:  0              |  Easy pickings:  1
                  UI/UX:  0              |
-----------------------------------------+------------------------
 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.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/29030>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/048.f3883cebbc38e3589b82bb989f1ffd1c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to