diff options
author | Wojciech Polak <polak@gnu.org> | 2013-04-18 18:01:38 +0200 |
---|---|---|
committer | Wojciech Polak <polak@gnu.org> | 2013-04-18 18:01:38 +0200 |
commit | 814533bed4e6b8e6e274f6d8c2cf21ec33ba2cd1 (patch) | |
tree | fcc823796211a7672445931b84d3181a05ebf355 | |
parent | 73eb07dbd4fe124cad62335eabcbe748fe9052e5 (diff) | |
download | glifestream-814533bed4e6b8e6e274f6d8c2cf21ec33ba2cd1.tar.gz glifestream-814533bed4e6b8e6e274f6d8c2cf21ec33ba2cd1.tar.bz2 |
Bugfix
-rw-r--r-- | stream/views.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/stream/views.py b/stream/views.py index 78c5569..a08e09b 100644 --- a/stream/views.py +++ b/stream/views.py @@ -6,24 +6,25 @@ # option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see <http://www.gnu.org/licenses/>. import time import datetime +from urlparse import urljoin from django.conf import settings from django.core import urlresolvers from django.http import HttpResponse from django.http import HttpResponseForbidden from django.http import HttpResponseRedirect from django.http import HttpResponseNotFound from django.http import HttpResponsePermanentRedirect from django.http import Http404 from django.shortcuts import render_to_response from django.template.loader import render_to_string from django.template.defaultfilters import fix_ampersands from django.template.defaultfilters import truncatewords @@ -320,25 +321,25 @@ def index(request, **args): urlresolvers.reverse('entry', args=[entry.id])) if 'title' in page: del page['title'] entry.gls_absolute_link = '%s%s' % (page['site_url'], entry.gls_link) # Check single-entry URL if 'exactentry' in page: if len(entries): gls_link = entries[0].gls_link if gls_link != request.path: return HttpResponsePermanentRedirect(gls_link) - page['canonical_link'] = '%s%s' % (settings.BASE_URL, gls_link) + page['canonical_link'] = urljoin(settings.BASE_URL, gls_link) else: raise Http404 if 'title' in page and page['title'] != '': if page_title: page['title'] += getattr(settings, 'STREAM_TITLE_SUFFIX', ' | ' + page_title) elif page_title: page['title'] = page_title # Pickup right output format and finish. format = request.GET.get('format', 'html') |