-1
에 다른 모델을 포함하는는 어떻게하여 MongoDB에서이 데이터베이스가 장고
picture:"http://placehold.it/150x150"
name:"Gushkool"
email:"[email protected]"
city:"Rabat"
location:Object
type:"Point"
coordinates:Array
0:-6.81134
1:33.95564
나는이 데이터베이스와 같은 모델을 생성하려면이 내 샷 :
class location(Document):
type = fields.StringField()
coordinates = fields.StringField()
class products(Document):
picture = fields.StringField()
name = fields.StringField()
email = fields.StringField()
city = fields.StringField()
location = ReferenceField(location)