-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expand not working as expected #29
Comments
As you're referencing the expandable_fields = {
'book': ('<app>.BookSerializer', {
'source': 'book'
})
} |
Same issue. I am referencing serializers by class:
|
Rolling back to version |
I was making something like this but for GET method only, I think I've managed to make it more advanced and flexible, for those who want to check it out it's django-restql. Feedback will be appreciated. |
@rsinger86 I'd add to this, that it can be confusing because of the implementation of In a way I feel like I had been using the
And it surprised me at first that I had to include them in the fields, as they are already in the expand list. Maybe we could add to the docs, that Anyway, maybe it's obvious to others, but I did lose some time over it. |
I have the following models:
and serializers as follows:
If i make a call to
http://localhost:8000/v1/coupons/templates/6/?expand=book
I'd expect book to expand to the nested serializer. Unfortunately it doesn't and I've drawn a blank debugging.My viewset:
confirms that book is expanded. (i,e, it prints True in the console).
Am I doing something obviously dumb, and if not, where should I start with debugging the issue? I'm on django 2, python 3.6
The text was updated successfully, but these errors were encountered: