Comments (1)
I needed this too, so I forked and threw something together. Here's my commit. It works for ModelSerializers, but not plain serializers, and has no tests, so it's only a starting point if you want to build a PR off of it.
Also note that QueryFieldsMixin prevents the serialization of fields, but not the querying in whatever uses the serializer. If you're optimizing for expensive queries, instead of expensive serialization, you'll need to optimize elsewhere too.
from djangorestframework-queryfields.
Related Issues (17)
- Consider overriding to_representation instead of modifying self.fields HOT 2
- Feature already implemented in DRF ^3.4.0? HOT 1
- New Feature - Nested Fields HOT 14
- Add Django 1.11 support
- "values_list" equivalent with flat=True functionality
- Actually avoid hitting the DB HOT 5
- Add note to docs / github landing to mention supported Django/DRF/Python versions HOT 3
- Select fields in POST/PATCH requests HOT 2
- Options are read from settings HOT 3
- self.context is getting cleared in serializers.SerializerMethodField() HOT 1
- Add Django 2.2 to CI matrix
- getting particular nested fields not working using this fields filtering HOT 5
- Documentation on test is missing HOT 1
- The fields parameter doesn't appear in API docs HOT 2
- Default fields and required fields HOT 1
- QueryFieldsMixin and GeoFeatureModelSerializer
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 djangorestframework-queryfields.