from django.utils.encoding import *
# views.py ## def country_detail(request, country_code): profiles = Profile.objects.filter(country__shortcode=country_code).filter(user__is_active='1') return render_to_response('people/country.html',{ 'country_code': country_code, 'country': country, 'profile_list': profiles, # does not work if I say unicode(profiles).encode("utf-8") }, context_instance=RequestContext(request)) ### end ### On Mon, Apr 5, 2010 at 2:50 PM, Willem <mati...@gmail.com> wrote: > ankit, > > I understand the error is related to unicode -- but it is not clear > where the unicode() statement must go. > Where in my code in views.py > > ## views.py ## > > def country_detail(request,country_code): > profiles = > > Profile.objects.filter(country__shortcode=country_code).filter(user__is_active='1') > return render_to_response('people/country.html',{ > 'country_code': country_code, > 'country': country, > 'profile_list': profiles, # does not work if I say > unicode(profiles) > }, context_instance=RequestContext(request)) > > ### end ### > > > > As I said --- if I comment out the lines 24 & 34 (as per original > post) -- all is OK > I already changed my python binding from cmemcache to pyth-memcache, > this made no difference. > > Any other ideas / or please clarify > > > > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.