Can I have a field be writable for validation, but not get passed to the model save in django rest framework? -
currently i'm doing this:
class surveyresponseserializer(serializers.modelserializer): repeat_email = serializers.charfield() def create(self, validated_data): validated_data.pop('repeat_email') return super(surveyresponseserializer, self).create(validated_data)
is there nicer way fix this? don't want keep growing create
every field.
Comments
Post a Comment