Re: serialization in Django

2012-03-07 Thread Rafael Durán Castañeda
On 03/06/2012 09:52 PM, shiji bijo wrote: ok I have removed the json.dumps() now the view is def do_GET(self, offset): data=get_object_or_404(NewAuction,pk=offset) context=serializers.serialize("json",[data]) return render_to_response("index.html",{"context":context}) an

Re: serialization in Django

2012-03-06 Thread shiji bijo
ok I have removed the json.dumps() now the view is def do_GET(self, offset): data=get_object_or_404(NewAuction,pk=offset) context=serializers.serialize("json",[data]) return render_to_response("index.html",{"context":context}) and my index.html is {% extends 'base.html' %

Re: serialization in Django

2012-03-06 Thread Daniel Roseman
On Tuesday, 6 March 2012 19:14:55 UTC, angel wrote: > > I am new to django and doing my course project. I am searching for a > solution for iterating JSON dictionary in html page. My django view > is the following: > > def do_GET(self, offset): > data=get_object_or_404(NewAuction,pk=o

Re: serialization in Django

2012-03-06 Thread shiji bijo
thanks for the reply. In our course project it is a requirement to use serialised data for CRUD and display it on the html page.But we are not allowed to use the REST frameworks.I tried using return Httpresponse(serialiseddata). But i dont know where to write the javascript code On Tue, Mar 6, 201

Re: serialization in Django

2012-03-06 Thread Ilian Iliev
If you are returning json it seems more proper to me to parse it using JavaScript. Why exactly do you return json but not a normal dict/object? -- eng. Ilian Iliev Web Software Developer Mobile: +359 88 66 08 400 Website: http://ilian.i-n-i.org On Tue, Mar 6, 2012 at 9:14 PM, angel wrote: >

serialization in Django

2012-03-06 Thread angel
I am new to django and doing my course project. I am searching for a solution for iterating JSON dictionary in html page. My django view is the following: def do_GET(self, offset): data=get_object_or_404(NewAuction,pk=offset) context=serializers.serialize("json",[data]) d