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

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -