niceyes 发表于 2021-9-30 23:04:44

很小白的问题,, django 路由怎么指向 Vue 的index.html

本帖最后由 niceyes 于 2021-9-30 23:06 编辑

    1.   render(request,'vue/public/index.html') 出错
   2.               Htttpresponse(,'vue/public/index.html') 出一个字符串

3,我把django settings 中的 templage 指向 ,'vue/public" 也没用出错,提示 get_template .....

      我是前后端分离的. 但怎么让django 返回 vue 的index.html 啊,出不了页面啥也弄不了

kogawananari 发表于 2021-9-30 23:07:48

用 drf(我觉得不好用)
或者、、、换框架吧fastapi(中文文档很好读)

niceyes 发表于 2021-9-30 23:25:03

kogawananari 发表于 2021-9-30 23:07
用 drf(我觉得不好用)
或者、、、换框架吧fastapi(中文文档很好读)

晕,,又学一个框架?刚学完rest framework,学不过来啊
页: [1]
查看完整版本: 很小白的问题,, django 路由怎么指向 Vue 的index.html