Look at django-argonauts
https://github.com/fusionbox/django-argonauts
It provides a nice (safe) template tag you can use to filter json
serializable python objects into safe javascript objects.
On Thursday, April 9, 2015 at 11:50:50 AM UTC-6, Eric Plumb wrote:
>
> Hi Djangoers!
>
> Sometimes i
I guess both methods are valid.
Method one could be useful if it makes sense to have a data attribute.
Although, if it makes sense to have a data attribute filled up with JSON, and
if the json is simple enough, then you can surely convert the json file to
"data-" element (for exemple, {"name" :
I often use method 2. I don't see a problem with it.
On 10 April 2015 at 02:08, Eric Plumb wrote:
> Hi Djangoers!
>
> Sometimes in the course of human events it becomes necessary to encode a
> JSON object directly into a template. We all prefer AJAX and REST APIs and
> the rest of the TOFLAs, b
What about putting it into ?
On Thursday, April 9, 2015 at 8:50:50 PM UTC+3, Eric Plumb wrote:
>
> Hi Djangoers!
>
> Sometimes in the course of human events it becomes necessary to encode a
> JSON object directly into a template. We all prefer AJAX and REST APIs and
> the rest of the TOFLAs, bu
Hi Djangoers!
Sometimes in the course of human events it becomes necessary to encode a
JSON object directly into a template. We all prefer AJAX and REST APIs and
the rest of the TOFLAs, but in the cases where it has to be part of the
template, I'm wondering if there's an accepted canonical bes
5 matches
Mail list logo