Closed spoof closed 14 years ago
Hello spoof, Probably your fix will solve the problem, but can you share some example to reproduce the problem?
Hello,
It happens when dajax returns data and this data contains with non ascii chars. In my example i use default <option></option> tag with {% trans %} template tag:
ajax.py:
def ajax_selectbox(request, _id): dajax = Dajax() objs = SomeModel.objects.filter(id=_id) out = render_to_string('template.html', {'objs' : objs}) dajax.assign('#options', 'innerHTML', out) return dajax.json()
template.html:
{% load i18n %} <option value="">{% trans "Please select model" %}</option> ....
After some testing, seems to work well. Changes will be released in 0.8.4
Fixed in dajaxice-0.1.3
When i use localized data in my forms with Dajax i get error:
in dajax/core/Dajax.py on _clean(self, data):
Maybe it should use 'unicode()' instead of 'str()' ?