Allows for automatic serialization of Djongo fields w/ Django REST
Project description
rest-meets-djongo
A package which enables serialization of Djongo fields with django-rest-framework's (DRF) serializers and viewsets
Features
NOTE: This repo is currently under development, and most (if not all) of its features are likely to throw errors or behave in unexpected ways; use at your own risk
Similar to DRF ModelSerializers, creating serializers using DjongoModelSerializer allows for the following fields to be detected and automatically managed through DRF's serializer setup. These fields include:
- ObjectIDField
- EmbeddedModelField
- ArrayModelField (WIP)
- ArrayReferenceField (WIP)
Usage
-
Install rest-meets-djongo:
pip install rest_meets_djongo
- Replace REST's 'ModelSerializer' with 'DjongoModelSerializer' and enjoy Djongo model serializeation
Requirements:
(Earlier version testing is currently being testing; these are just the confirmed functional versions)
- Python 3.6 or higher
- MongoDB 4.0 or higher
- djangorestframework 3.9 or higher
- djongo 1.2 or higher
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.