摘要:
需要给前端以xml格式提供一些数据,这些数据在目前的数据库中已经存在。如果使用django返回xml数据的话,需要包装下头信息:r = HttpResponse(str_xml)r.mimetype = "text/xml"r['Content-Type'] = "application/xml"另外,使用group by可以使用以下方式来查询。objs = Fish.objects.raw("SELECT id, almanac_name, style , almanac_code,almanac_description FR 阅读全文
posted @ 2011-06-30 11:38 蛇小狼 阅读(324) 评论(0) 推荐(0)
浙公网安备 33010602011771号