Add special exclusion for FileUploadParser

Fixes #288
This commit is contained in:
Cristi Vijdea
2019-03-04 00:48:55 +02:00
parent f348084d85
commit 340a60324c
3 changed files with 6 additions and 4 deletions
+2 -2
View File
@@ -2,7 +2,7 @@ from djangorestframework_camel_case.parser import CamelCaseJSONParser
from djangorestframework_camel_case.render import CamelCaseJSONRenderer
from inflection import camelize
from rest_framework import generics, status
from rest_framework.parsers import FormParser
from rest_framework.parsers import FormParser, FileUploadParser
from drf_yasg import openapi
from drf_yasg.inspectors import SwaggerAutoSchema
@@ -22,7 +22,7 @@ class SnippetList(generics.ListCreateAPIView):
queryset = Snippet.objects.all()
serializer_class = SnippetSerializer
parser_classes = (FormParser, CamelCaseJSONParser,)
parser_classes = (FormParser, CamelCaseJSONParser, FileUploadParser)
renderer_classes = (CamelCaseJSONRenderer,)
swagger_schema = CamelCaseOperationIDAutoSchema