views:

32

answers:

1

Hi again,

I have a simile timeline built and I want to use the data from some django models.
I would like to known if is best to use XML or JSON.
I don't known anything about any of the two, so if I have to learn, it's best to known which will do what I want.

I will need to make some loops to iterate over the data and use variables.

Anyone has any recommendation?

Thanks guys :)

A: 

If you are going to use JavaScript to generate the timeline then JSON is a better, more natural fit. Either way you will need to work out how you are going to serialize the data and send it to the templates. Then you can manipulate the data using JavaScript in your web client.

Here are a couple of links of interest:

  1. Serializing Django model instances.
  2. Working with JSON.

It is difficult to give a more detailed answer without knowing what you are trying to accomplish (the link you provided in the comment timed out). I suggest exploring on your own. There is always StackOverflow to ask more questions in case you get stuck :)

Manoj Govindan
Probably your right.. I'm still new to these things, since I started learning programming only a few months, and Javascript scares me a little lol but it do really nice things :)Thank you for your answer
Pat