umutbozkurt / django-rest-framework-mongoengine

Mongoengine support for Django Rest Framework
MIT License
616 stars 167 forks source link

Support for drf 3.10.x release. #269

Closed Betalos closed 4 years ago

Betalos commented 5 years ago

Well I know by reading the other issue that this a low priority project. But is it possible to just adjust the code as it is just to work with the new version of drf.

benxy commented 5 years ago

I noticed problem with non-existing unicode_to_repr function from rest_framework.compat. Did you find anything else?

Betalos commented 5 years ago

@benxy, Well I didn't noticed something else. But I didn't investigate further.

talhaishtiaque commented 5 years ago

Getting error: from rest_framework.compat import unicode_to_repr ImportError: cannot import name 'unicode_to_repr' from 'rest_framework.compat' (lib/python3.7/site-packages/rest_framework/compat.py)

Is there some way to make ViewSet work without 'unicode_to_repr'

Betalos commented 5 years ago

@talhaishtiaq, well for now you'll have to downgrade drf to 3.9.4. Until a fix is published.

benxy commented 5 years ago

According to commit in django-rest-framework, this was dropped as a part of removing python2 compatibility. @BurkovBA would then a solution be also to drop compatibility for python2? I just removed the functions in my forked version.

talhaishtiaque commented 5 years ago

@benxy So is it working in your forked version? who uses Python 2 these days

talhaishtiaque commented 5 years ago

its a very nice plugin for MongoDB and Django integration How can I start contributing? @Betalos I have changed the version of drf to 3.9.4 and its working good. sql is very slow than nosql MongoDB queries in Django api are much faster after migrating with mongoengine.

BurkovBA commented 5 years ago

@benxy Hi, folks! I see your issue, but unfortunately I'm currently very busy on the weekdays, sorry about that. Will take a look on the weekend, hopefully, will make a release.

DRF 3.9 has dropped support for python2, so I'll modify testing matrix in .tox to support only python3 for DRF 3.9.

Betalos commented 5 years ago

@BurkovBA DRF 3.10.* (3.9.* is still working).

benxy commented 5 years ago

Np @BurkovBA. Thanks!

talhaishtiaque commented 5 years ago

I just removed the "unicode_repr" from

rest_framework_mongoengine/repr.py rest_framework_mongoengine/serializers.py rest_framework_mongoengine/validators.py

and its working with DRF 3.10.x

uoxiu commented 4 years ago

Fixed and available in v3.4.0

joyhuchao commented 2 years ago

could you add the function in the last version?