"View on site" links in admin don't work for an https site
|Reported by:||cbrand@…||Owned by:||adrian|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
This was mentioned as a side-note in http://code.djangoproject.org/ticket/634.
My site is entirely served through https.
When I added get_absolute_url() methods to my models, the "view on site" links appeared in the admin, as expected. Although they initially go to an https location (with "r" and some numbers), that then redirects to an http link, which doesn't work. If it used "https:" instead of "http:", it would work.
The problem seems to be the hard-coded "http" at line 64 of django/views/defaults.py :
return http.HttpResponseRedirect('http://%s%s' % (object_domain, absurl))
I don't know how to figure out whether "http" or "https" is appropriate, or I'd submit a patch...
Change History (6)
Changed 9 years ago by treborhudson@…
comment:1 Changed 9 years ago by Rob Hudson <treborhudson@…>
- Cc treborhudson@… added
- Has patch set
- Needs documentation unset
- Needs tests set
- Patch needs improvement unset