authorWojciech Polak <>2013-04-18 16:01:38 (GMT)
committer Wojciech Polak <>2013-04-18 16:01:38 (GMT)
commit814533bed4e6b8e6e274f6d8c2cf21ec33ba2cd1 (patch) (side-by-side diff)
parent73eb07dbd4fe124cad62335eabcbe748fe9052e5 (diff)
Diffstat (more/less context) (ignore whitespace changes)
1 files changed, 2 insertions, 1 deletions
diff --git a/stream/ b/stream/
index 78c5569..a08e09b 100644
--- a/stream/
+++ b/stream/
@@ -12,12 +12,13 @@
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <>.
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
@@ -326,13 +327,13 @@ def index(request, **args):
# 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)
raise Http404
if 'title' in page and page['title'] != '':
if page_title:
page['title'] += getattr(settings, 'STREAM_TITLE_SUFFIX',

Return to:

Send suggestions and report system problems to the System administrator.