Comments (7)
Any chance this is being worked on? This issue makes using the lib for anything but really simple models almost impossible.
from django-rest-framework-mongoengine.
I'll look into it as soon as I got spare time
from django-rest-framework-mongoengine.
Thanks, I will do the same.
from django-rest-framework-mongoengine.
The readme says: "Depth is optional and defaults to 5. It is used for ReferenceField & ListField."
The fix to get to this state is pretty simple. However, I would not expect depth to determine how deep the serializer goes into a ListField. Only how many relationships the serializer follows.
From the Django REST framework documentation: "The depth option should be set to an integer value that indicates the depth of relationships that should be traversed before reverting to a flat representation."
from django-rest-framework-mongoengine.
You've got a point. Depth should not be used in ListField directly.
Fixing depth argument should fix @crhuber 's specific issue on #37
from django-rest-framework-mongoengine.
I will take a look at this this tonight
from django-rest-framework-mongoengine.
I forked your repo and wrote a solution. If you are interested in what I did checkout danpoland@80db2df.
I put a pull request in.
from django-rest-framework-mongoengine.
Related Issues (20)
- Compatible with Django 3.0 HOT 3
- Embedded Document field has no attribute items error in recursive_save
- type object 'XXX' has no attribute '_fields' HOT 2
- Testing API's?
- rest_framework_mongoengine CreateOnlyDefault() not working
- NullBooleanField is deprecated in favor of BooleanField(allow_null=True)
- Serializer Field: `default=0` gets ignored HOT 1
- Let's use ref_name for nested embedded fields as well HOT 5
- The DocumentSerializer uses the default value from the model definition when the field does not even exists in the document yet HOT 2
- Is there a way to speed serializer? HOT 1
- No validation for primary key HOT 1
- `style` not included in `utils.get_field_kwargs()`; not aligned to DRF core arguments HOT 2
- Is nested DynamicEmbeddedDocument of Mongoengine supported in DRF mongoengine? HOT 2
- Is it possible to enable cache? HOT 3
- Create a Permissions Profile HOT 1
- Upon deserializing, reference fields are not present within the validated_data HOT 1
- QuerySet class in MongoEngine does not have .model key as the django.db.models.query.QuerySet.model in
- How using write_concern args when perform_create method is invoke
- Object of type ObjectId is not JSON serializable HOT 2
- AttributeError: module 'rest_framework.fields' has no attribute 'NullBooleanField' HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-rest-framework-mongoengine.