def get_context_data(self, **kwargs):
        context = super(EmbeddedFormMixin, self).get_context_data(**kwargs)

        self.object = getattr(self, 'object', self.get_object())
        if 'form' in kwargs:
            form = kwargs['form']
        else:
            form = self.get_form(self.get_form_class())
        context[self.embedded_context_name] = form

        return context
dataset/ETHPy150Open MongoEngine/django-mongoengine/django_mongoengine/views/embedded.py/EmbeddedFormMixin.get_context_data/original