阅读背景:

Django使用自定义SQL而不是模型将JSON对象返回到模板

来源:互联网 

I currently am able to retrieve JSON data/object from my models.py and MySQL database and send that JSON object to my template. How would I be able to use custom SQL to retrieve data from MySQL then make it into a JSON object to send to my template. I basically don't want to use models.py at all. Here is what I have in my views.py when I am using models.py:I currently am able to retrieve JSON data/objec




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: