1👍
✅
You need to be accessing ‘serializer.is_valid()’ before accessing the data. Looks like there’s a missing bit of API there – serializer.data should probably raise an expection if its accessed before validation.
0👍
Seems you are not using Django’s serializers but anyway serialization is not made for validation. Use forms to validate your data then use json
as you do to serialize it. Django’s serializers are for querysets and models only.
- [Answer]-CommandError: notifications.notification: 'recipient defines a relation with the model 'auth.User'
- [Answer]-Add an New app to django-oscar
- [Answer]-How to handle django grouped choices?
Source:stackexchange.com