django-rest-framework-mongoengine-example icon indicating copy to clipboard operation
django-rest-framework-mongoengine-example copied to clipboard

AttributeError: module 'mongoengine.fields' has no attribute 'DateField'

Open lakshaytalkstomachines opened this issue 4 years ago • 2 comments

class DocumentSerializer(serializers.ModelSerializer): File "/home/test/.virtualenvs/perm_test_django_mongo/lib/python3.6/site-packages/rest_framework_mongoengine/serializers.py", line 117, in DocumentSerializer me_fields.DateField: drf_fields.DateField,

MongoEngine Did not even had DateField, How did you use it ?

lakshaytalkstomachines avatar Mar 17 '20 05:03 lakshaytalkstomachines

I am also getting the same answer. And please can someone update the code?! I am its using very older version of everything in requirements.txt

harshilishere avatar May 19 '20 19:05 harshilishere

DateField was added in MongoEngine 0.16.0, so you might need to upgrade versions.

esmail avatar Mar 17 '22 14:03 esmail