Thank you Patrick and Gábor,
Here is my final view (tested with Django HTTP server, FireFox 2.0 and
IE6.0):
from django.shortcuts import HttpResponse
from wabe.body.models import Section
from django.utils.simplejson import dumps
def loadcontent(request):
post = request.POST.copy()
sectio
olive wrote:
> Hello,
>
> I'm trying to send som UTF-8 data this way:
>
> json = serializers.serialize("json", myQuerySet, ensure_ascii=False)
> return HttpResponse(json, mimetype="text/javascript; charset=UTF-8")
>
> But the accented characters are not displayed properly in the browser.
>
>
.. and this the way I've done it in the mean time:
json = '['
for co in section.contentsorder_set.all().iterator():
if json != '[':
json += ','
json += '{"content": "'+co.datacontent.content+'", "type":
"'+co.datacontent.type+'"}'
json += ']'
Time to write
I never got that to work either - here´s how I´m dealing with it:
import django.utils.simplejson as simplejson
data = []
...
try:
school_list = School.objects.filter(...)
for school in school_list:
school_info = school.name.
Hello,
I'm trying to send som UTF-8 data this way:
json = serializers.serialize("json", myQuerySet, ensure_ascii=False)
return HttpResponse(json, mimetype="text/javascript; charset=UTF-8")
But the accented characters are not displayed properly in the browser.
But if I put this on the first li
5 matches
Mail list logo