Manipulate files from a POST to create a model with django-rest-framework -
i using django rest framework build api. using viewset
handle actions specific model this:
class stareaviewset(viewsets.modelviewset):` queryset = starea.objects.all() serializer_class = stareaserializer permission_classes = (isowner,)
i have data populate attributes of starea
object upload in file, file can access in request.files
dict.
where can manipulate file data need create model? should override .create()
method on viewarea
? if how can pass information __init__
method on model?
Comments
Post a Comment