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
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' %
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
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
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:
>
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
6 matches
Mail list logo