【发布时间】:2014-09-14 19:12:12
【问题描述】:
我正在尝试将 parse.com 作为我的 django 应用程序的数据库。我已经安装了 parse_rest。
我有一个字典列表,每个字典的形式为:
all_practices = {'a':value1, 'b':value2 ...}
根据 Michael Otte 提供的答案,Add and save objects to parse.com db from django
我可以通过以下方式保存这个对象:
from parse_rest.datatypes import Object
class Profile(Object):
pass
# instantiate with parameters
profile = Profile(name='Johnny', age=27)
有没有办法直接将字典对象作为profile对象的参数传递,从而得到:
profile = Profile(a='value1', b='value2')
【问题讨论】:
标签: python django dictionary