valdergallo / data-importer

Django Data Importer
https://django-data-importer.readthedocs.org/
Other
66 stars 32 forks source link

Django-Rest_framework Example #67

Open klahnen opened 8 years ago

klahnen commented 8 years ago

Hi,

I would like to know if its possible to add an example using one DRF.

Example ( http://www.django-rest-framework.org/api-guide/parsers/#fileuploadparser )

Basic usage example:

class FileUploadView(views.APIView):
    parser_classes = (FileUploadParser,)

    def put(self, request, filename, format=None):
        file_obj = request.data['file']
        # ...
        # do some stuff with data-importer
        # ...
        return Response(status=204) # If data-importer succeeds on save.
valdergallo commented 8 years ago

Hi, klahnen Amazing, idea !!!

Could you send me one pull request with changes that you need ? If not I'll make some examples in my free time.

klahnen commented 8 years ago

Hey valdergallo,

I will work on that and if you agree I will be posting questions if I get stuck. Thanks for your time.

valdergallo commented 8 years ago

OK, no problem

tnx :D