Skip to content
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

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

Open
Guilouf opened this issue Sep 26, 2018 · 1 comment
Open

Comments

@Guilouf
Copy link

Guilouf commented Sep 26, 2018

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
@SebCorbin
Copy link

It seems there is the same issue for SerializerForm, which cannot handle model serializers as well, see #20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants