2024-04-20 14:25:16 发布
网友
所以我开发了一个使用django作为后端框架的网站余烬作为前端框架。在
我知道如何将实例从django发送到余烬(通过tastypie)并在网站上展示。我知道如何从Django中的模型创建表单,然后将其呈现为模板(在Django模板语言中)。但是如何在网络上展示它呢ember.js?没有重新加载页面。在
我知道这个问题看起来有点不具体,但我不知道该怎么做。在
从你的问题看来,你想从django的tastype中吐出一个形式定义?在
您需要为ModelForm或从django到json的表单提供序列化器,它需要输出类似以下json的内容:
{ "fields": [ {"type": "text", "name": "username"}, {"type": "password", "name": "password"}, ] }
然后使用the following answer to render the components in ember中的把手/余烬魔法?在
从你的问题看来,你想从django的tastype中吐出一个形式定义?在
您需要为ModelForm或从django到json的表单提供序列化器,它需要输出类似以下json的内容:
然后使用the following answer to render the components in ember中的把手/余烬魔法?在
相关问题 更多 >
编程相关推荐