correct accent in keys V02.04
authorymh <ymh.work@gmail.com>
Tue, 13 Mar 2012 15:11:24 +0100
changeset 163 e4ff12317fa3
parent 162 a2cb4f425a9f
child 164 c49ea62fe9fc
correct accent in keys
web/hdalab/views/ajax.py
--- a/web/hdalab/views/ajax.py	Tue Mar 13 14:11:03 2012 +0100
+++ b/web/hdalab/views/ajax.py	Tue Mar 13 15:11:24 2012 +0100
@@ -162,7 +162,10 @@
     content_count = request.GET.get('contentcount', 12)
     tag_count = request.GET.get('tagcount', 30)
     
-    cache_key = fix_cache_key("-".join(("filter",request.LANGUAGE_CODE,str(periode),str(label),str(country),str(contentlist),str(max_tag_order),str(content_count),str(tag_count))))
+    key_parts = ("filter",request.LANGUAGE_CODE,periode,label,country,contentlist,max_tag_order,content_count,tag_count)
+    key_parts = [unicode(p).encode("utf-8") for p in key_parts]
+    
+    cache_key = fix_cache_key("-".join(key_parts))
     
     outputstr = cache.get(cache_key)