I decided to "stick" without the json field... too much code/decode
envolved and the json will grow very big. In the admin will be a mess...
Thank you all and forget it! :P
2016-08-19 16:36 GMT+01:00 António Ramos :
>
> [image: Imagem inline 1]
>
> 2016-08-19 16:26
[image: Imagem inline 1]
2016-08-19 16:26 GMT+01:00 Marlysson Silva :
> In a view.json? weired..
>
> Em sexta-feira, 19 de agosto de 2016 12:24:23 UTC-3, Ramos escreveu:
>>
>> Instead of "Gestão" i get this when rendering with BEAUTIFY(row) being
>> row=db.responses[my_ID]
In a view.json? weired..
Em sexta-feira, 19 de agosto de 2016 12:24:23 UTC-3, Ramos escreveu:
>
> Instead of "Gestão" i get this when rendering with BEAUTIFY(row) being
> row=db.responses[my_ID]
> allresponses :
> Gsãcn : 1
> delete_record :
> f1 :
> id : 99L
> update_record :
>
> 2016-08-19
Instead of "Gestão" i get this when rendering with BEAUTIFY(row) being
row=db.responses[my_ID]
allresponses :
Gsãcn : 1
delete_record :
f1 :
id : 99L
update_record :
2016-08-19 16:18 GMT+01:00 Marlysson Silva :
> For test, try render the controller data in a
For test, try render the controller data in a generic_view.json .. to test
whether the encode the page which it's wrong..
Em sexta-feira, 19 de agosto de 2016 12:07:27 UTC-3, Ramos escreveu:
>
> yes i remove the unquote and saved request.vars directly.
>
> Also went to admin and by hand created
yes i remove the unquote and saved request.vars directly.
Also went to admin and by hand created a new record with
{"Gestão":1} on the json field and it was saved as {u'Gs\xe3\x00cn': 1}
so far so good , i understand now that saving in json fields encodes the
data.
Now i need to read that data
You removed the urllib.uquote() ? And after just receiving the request
directly..
Em sexta-feira, 19 de agosto de 2016 11:51:54 UTC-3, Ramos escreveu:
>
> Ok got it.
> If i create a new record via admin with
>
> {"Gestão":1} in the json Field, after saving the new record i get it as
>
>
Ok got it.
If i create a new record via admin with
{"Gestão":1} in the json Field, after saving the new record i get it as
{u'Gs\xe3\x00cn': 1}
You said its utf-8 encoded
How do i decode it again to "Gestão" ?
u'Gs\xe3\x00cn'.decode('utf-8') does not work..
sorry and thank you for your time.
why don't you just pass request.vars without quoting and unquoting
anyway, json is always utf-8 encoded. that's the difference you're seeing.
On Friday, August 19, 2016 at 11:43:55 AM UTC+2, Ramos wrote:
>
> Hi,im starting a new post because i found that JSON fields change data as
> they
9 matches
Mail list logo