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' %}
{% block contentblock %}
{{ context }}
{% endblock %}
and it is printing like
[{"pk": 5, "model": "Auction.newauction", "fields": {"username": 1,
"category": "furniture", "description": "Made of Wood", "end_date":
"2012-05-01 11:00:00", "start_price": "100", "title": "Table",
"start_date": "2012-03-04 11:24:11"}}]
But how I can iterate the fields in html. please help me
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.