Skip to content
This repository has been archived by the owner on Feb 1, 2019. It is now read-only.

Python 3 support in build_html_iframe() #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions aldryn_video/utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
from django.utils.six import iteritems, text_type
from django.utils.six.moves.urllib.parse import urlencode
from django.utils.six.moves.urllib.parse import parse_qs, urlparse, urlunparse

Expand Down Expand Up @@ -42,10 +43,10 @@ def build_html_iframe(response, url_params=None, iframe_attrs=None):

html['src'] = urlunparse(url_parts)

for key, value in iframe_attrs.iteritems():
for key, value in iteritems(iframe_attrs):
if value:
html[key] = value
return unicode(html)
return text_type(html)


def get_player_url(response):
Expand Down Expand Up @@ -92,4 +93,4 @@ def rename_tables_old_to_new(db, table_mapping=None):


def rename_tables_new_to_old(db, table_mapping=None):
return rename_tables(db, table_mapping, reverse=True)
return rename_tables(db, table_mapping, reverse=True)