I am using mongoengine in django.I want to create a objectid which I can insert in nested object wholesalers of firm collection
class wholesaler(EmbeddedDocument):
wid = ObjectIdField()
name = StringField(required = True,min_length = 3)
class firm(Document):
name = StringField(required=True)
wholesalers = ListField(EmbeddedDocumentField(wholesaler))
In View.py
wholesaler1 = wholesaler(wid = ??
,name = '')