def view(request, bookmark_id): bookmark = get_object_or_404(Bookmark, pk=bookmark_id, owner=request.user.id) template = loader.get_template('iota/view.html') if bookmark.url[0:7] == "http://": favicon = bookmark.url[8:].split('/', 2) context = Context({ 'bookmark': bookmark, 'favicon': favicon, }) return HttpResponse(template.render(context))