Open ShipraShalini opened 7 years ago
If I have Document like:
from django_mongoengine import Document, fields
class Dummy(Document):
name = fields.StringField()
value = fields.IntField(required=False)
And use data like: { "name": "abc"}
I still get ValidationError: {'value': [u'This field is required.']}
But If I revert it back to
from mongoengine import fields, Document
it works.
@ShipraShalini
Wow, something scary is going on there. Why would they override Document in django-mongoengine?:) Sorry, I haven't worked with that part of django-mongoengine. So, not sure about the compatibility.
@ShipraShalini
Yes, it should be.
In brief, until 0.8.8,
Mongoengine
was developed by Ross Lawley, who passed the project to other maintainers in the late 2014 - early 2015.Those maintainers released Mongoengine 0.9 and 0.10. In
Mongoengine <=0.9
, there is a subpackage, calledmongoengine.django
, which contains compatibility layer for django authentication machinery.Then new maintainers decided that if there are various compatibility packages such as
flask-mongonegine
andeve-mongoengine
, django is not a special one and the django compatibility code should be moved into a separate packagedjango-mongoengine
inMongoengine 0.10
.On my day job, we make use of
Mongoengine 0.9
in our current projects and for authentication we use itsmongoengine.django
subpackage. I can share my authentication app with you - I'll updatedjango-rest-framework-mongoengine
repository with account app that implements authentication inmongoengine.django
. Theoretically,django-mongoengine
should be compatible with that code.