Browsable API crashes with PresentablePrimaryKeyRelatedField
See original GitHub issueWhile declaring the presentable primary key related field like following:
city = PresentablePrimaryKeyRelatedField(
queryset=City.objects,
presentation_serializer=CitySerializer
)
where city serializer is
class CitySerializer(ModelSerializer):
class Meta:
model = City
I get unhashable type: 'ReturnDict'
in the browsable API. Any ideas how to fix it?
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
PresentablePrimaryKeyRelatedF...
I have a serializer field which works differently for read and write. I used PresentablePrimaryKeyRelatedField for that. e.g:
Read more >Release Notes - Django REST framework
Removes a XSS vulnerability for some kinds of content in the browsable API. 3.11.1. Date: 5th August 2020. Fix compat with Django 3.1....
Read more >Release Notes - Django REST framework
Django, API, REST, Release Notes. ... Fix exception when HTML_CUTOFF is set to None . #5174; Fix browsable API not supporting multipart/form-data correctly....
Read more >PUT/POST fails in case of blank input to optional fields in ...
1. If the parent serializer class has optional fields and I enter blank inputs for those fields through the browsable API when writing...
Read more >Django Rest Framework – An Introduction - Real Python
2 for this application. This tutorial covers these topics: DRF Setup; RESTful Structure; Model Serializer; DRF Web Browseable API. Free Bonus: Click here ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @scheparev-moberries,
Thank you for the report. @alicertel is responsible from that field. Assigning to him.
We took a release (0.10) you can use it from pypi as well.