Re: Append to models.JSONField on POST

2017-02-16 Thread ludovic coues
If there is one, I've never heard of it. But I'm not an heavy user of postgres or its JSONField. Maybe someone else know better than me :) 2017-02-16 17:30 GMT+01:00 chris jess : > Thanks. > > Was hoping there was a method for appending to a JSON array stored in a > JSONField

Re: Append to models.JSONField on POST

2017-02-16 Thread chris jess
Thanks. Was hoping there was a method for appending to a JSON array stored in a JSONField without fetching the whole record first. On Thursday, 16 February 2017 16:24:06 UTC, ludovic coues wrote: > > You can't. > > There is 7 value types in JSON. > 3 of them are constant, true, false and

Re: Append to models.JSONField on POST

2017-02-16 Thread ludovic coues
You can't. There is 7 value types in JSON. 3 of them are constant, true, false and null. Appending to them make no sense. You could append to number, but then you change its value. String are double quote delimited. You can't append to it, you need to insert before the closing double quote. aka

Append to models.JSONField on POST

2017-02-16 Thread chris jess
Can anyone let me know the best way to append to a models.JSONField on HTTP POST? I would prefer to simply append to the existing JSONField as opposed to updating the values in it. Is it possible to do this without first loading that object? Thanks. -- You received this message because you

Append to models.JSONField on POST

2017-02-16 Thread chris jess
Can anyone let me know the best way to append to a models.JSONField on HTTP POST? I would prefer to simply append to the existing JSONField as opposed to updating the values in it. Is it possible to do this without first loading that object? Thanks. -- You received this message because you