The package provides mongoengine support for django-rest-framework
For full documentation, usage and examples refer to DRF manuals.
The features and differences of this package are described in API documentation
- Django == 1.*
- djangorestframework == 3.*
- mongoengine == 0.11.* | 0.10.* | 0.9.*
- blinker == 1.* (for mongoengine referencefields to work)
- With mongoengine 0.11: pymongo == 3.*
- With mongoengine 0.10: pymongo == 3.*
- With mongoengine 0.9: pymongo == 2.*
pip install django-rest-framework-mongoengine
- download some release from github, unpack somewhere.
- copy subdir
unpacked_path/rest_framework_mongoengine
into your django project or inside python path - or, install using
pip unpacked_path
It may contain non-working code. Before using it, run tests to ensure the code is working.
INSTALLED_APPS = (
...
'rest_framework'
'rest_framework_mongoengine',
...
)
Use corresponding classes from this package in place of original DRF stuff. Refer to API documentation.
If you discover something does not work on the DRFM side, the best way to ensure that and report an issue - is to write a test case, with minimal code that fails. You may use this template to create your case.
If you have something (Django, DRF, mongoengine) at a version, not mentioned in release notes, you better run all the tests in your environment to ensure the DRFM is compatible with that version.
For tests to work, you need pytest in your environment.
To run all the tests:
./runtests.py --fast
To run tests from separate file, class or method:
./runtests.py --fast test_name
Intended to match DRF API. The major and minor version number matches supported version of DRF. Note: this release is incompatible with all previous.
Releases 2.x were not well compatible with DRF and mongoengine. Current code is mostly refactored and reimplemented.
Releases 1.x were developed to work with DRF 2
. This branch is no longer supported.
Documentation available here
@qwiglydee @BurkovBA @Vayel
Feel free to mail me if you consider being a maintainer.