summaryrefslogtreecommitdiffabout
authorWojciech Polak <polak@gnu.org>2013-04-18 16:01:38 (GMT)
committer Wojciech Polak <polak@gnu.org>2013-04-18 16:01:38 (GMT)
commit814533bed4e6b8e6e274f6d8c2cf21ec33ba2cd1 (patch) (side-by-side diff)
treefcc823796211a7672445931b84d3181a05ebf355
parent73eb07dbd4fe124cad62335eabcbe748fe9052e5 (diff)
downloadglifestream-814533bed4e6b8e6e274f6d8c2cf21ec33ba2cd1.tar.gz
glifestream-814533bed4e6b8e6e274f6d8c2cf21ec33ba2cd1.tar.bz2
Bugfix
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--stream/views.py3
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
@@ -12,12 +12,13 @@
#
# 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
@@ -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)
else:
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.