django-rest-framework-braces
django-rest-framework-braces copied to clipboard
NotImplementedError ** does not currently serialize Form --> JSON
trafficstars
Hello, i have a modelForm, like this:
class PhotographyAPIForm(forms.ModelForm):
class Meta:
model = Photography
fields = '__all__'
And i wanted to 'convert' this form to a serializer:
class PhotoSerializer(FormSerializer):
class Meta:
form = PhotographyAPIForm
Access it via a viewset:
class PhotoViewSet(viewsets.ModelViewSet):
queryset = Photography.objects.all()
serializer_class = PhotoSerializer
I'm using django-rest-framework-braces-0.2.3, DRF 3 and Django 2, and i receive this error:
NotImplementedError at /gabarit/api/photos/
PhotoSerializer does not currently serialize Form --> JSON
It seems there is the same issue for SerializerForm, which cannot handle model serializers as well, see https://github.com/dealertrack/django-rest-framework-braces/issues/20