【发布时间】:2016-01-18 06:47:58
【问题描述】:
问题是,我在一个模块上有一个 angular + cordova 应用程序。我只想要来自 django 的 REST api 用于网络服务器。没有视图或任何东西(仅用于角度视图)。
如何使用 django 提供静态 index.html?我需要不同的项目结构吗?我是 django 的新手。
提前致谢!
【问题讨论】:
-
您是否可以将此 index.html 页面放入您的 server/templates 文件夹中?编辑:顺便说一句,对于 REST api,最好不要返回 HTML 页面(而是返回 JSON 对象)。所以只是为了验证,你希望你的 REST api 服务于一个 html 页面?
-
是的。我在我的科尔多瓦应用程序中使用的同一个(index.html)
标签: python angularjs django cordova meanjs