def __init__(self, document, meta=None):
        super(DocumentMetaWrapper, self).__init__()

        self.document = document
        # used by Django to distinguish between abstract and concrete models
        # here for now always the document
        self.concrete_model = document
        if meta is None:
            meta = getattr(document, '_meta', {})
            if isinstance(meta, LazyDocumentMetaWrapper):
                meta = meta._meta
        self._meta = meta

        try:
            self.object_name = self.document.__name__
        except __HOLE__:
            self.object_name = self.document.__class__.__name__

        self.model_name = self.object_name.lower()

        # add the gluey stuff to the document and it's fields to make
        # everything play nice with Django
        self._setup_document_fields()
        # Setup self.pk if the document has an id_field in it's meta
        # if it doesn't have one it's an embedded document
        # if 'id_field' in self._meta:
        #    self.pk_name = self._meta['id_field']
        self._init_pk()
dataset/ETHPy150Open jschrewe/django-mongodbforms/mongodbforms/documentoptions.py/DocumentMetaWrapper.__init__