django-rest-framework-braces icon indicating copy to clipboard operation
django-rest-framework-braces copied to clipboard

NotImplementedError ** does not currently serialize Form --> JSON

Open Guilouf opened this issue 7 years ago • 1 comments
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

Guilouf avatar Sep 26 '18 09:09 Guilouf

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

SebCorbin avatar Aug 10 '21 14:08 SebCorbin