From 4f383353b32181b23c4805cd0ab749d0d3d14d51 Mon Sep 17 00:00:00 2001 From: Omar Al-Ithawi Date: Tue, 30 Sep 2014 17:53:25 +0300 Subject: [PATCH] Four Unicode fixes in discussion --- AUTHORS | 1 + lms/lib/comment_client/thread.py | 4 ++-- lms/lib/comment_client/utils.py | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/AUTHORS b/AUTHORS index fd39847687..0c98a82021 100644 --- a/AUTHORS +++ b/AUTHORS @@ -177,3 +177,4 @@ Alasdair Swan Paul Medlock-Walton Henry Tareque Eugeny Kolpakov +Omar Al-Ithawi diff --git a/lms/lib/comment_client/thread.py b/lms/lib/comment_client/thread.py index 0931444e7d..c720e78a1f 100644 --- a/lms/lib/comment_client/thread.py +++ b/lms/lib/comment_client/thread.py @@ -90,9 +90,9 @@ class Thread(models.Model): @classmethod def url_for_threads(cls, params={}): if params.get('commentable_id'): - return "{prefix}/{commentable_id}/threads".format(prefix=settings.PREFIX, commentable_id=params['commentable_id']) + return u"{prefix}/{commentable_id}/threads".format(prefix=settings.PREFIX, commentable_id=params['commentable_id']) else: - return "{prefix}/threads".format(prefix=settings.PREFIX) + return u"{prefix}/threads".format(prefix=settings.PREFIX) @classmethod def url_for_search_threads(cls, params={}): diff --git a/lms/lib/comment_client/utils.py b/lms/lib/comment_client/utils.py index 387163231b..56ae8d5269 100644 --- a/lms/lib/comment_client/utils.py +++ b/lms/lib/comment_client/utils.py @@ -40,8 +40,8 @@ def request_timer(request_id, method, url, tags=None): duration = end - start log.info( - "comment_client_request_log: request_id={request_id}, method={method}, " - "url={url}, duration={duration}".format( + u"comment_client_request_log: request_id={request_id}, method={method}, " + u"url={url}, duration={duration}".format( request_id=request_id, method=method, url=url,