Getting error with mongodbforms of django

58 views Asked by At

I have installed mongodbforms along with mongoengine. But till now i haven't written a single code still i am getting error on mongodbforms file how ?

  from mongoengine.base import NON_FIELD_ERRORS as MONGO_NON_FIELD_ERRORS

ImportError: cannot import name NON_FIELD_ERRORS

1

There are 1 answers

0
nesdis On BEST ANSWER

In order to use Django seamlessly with MongoDB, MongoEngine alone will not work. You need to use Django-nonrel aswell, which is a non relational flavor of Django. This project however is quite far behind Django, in terms of integration and features.

An alternative is to use djongo which lets you use the native Django Forms module, instead of mongoEngine forms. The advantage of-course, you get the latest features of the native django forms.

I have used djongo myself and it works quite well with all django related functions. There is no learning curve involved. You don't need to be an expert in Django ORM and mongoengine ORM to use MongoDB.

Disclaimer: I have contribute to djongo in the past but in no-way am I trying to promote or advertise its existence.