@method_decorator(require_POST)<EOL><INDENT>def process_import(self, request, *args, **kwargs):<DEDENT>
if not self.has_import_permission(request):<EOL><INDENT>raise PermissionDenied<EOL><DEDENT>form_type = self.get_confirm_import_form()<EOL>confirm_form = form_type(request.POST)<EOL>if confirm_form.is_valid():<EOL><INDENT>import_formats = self.get_import_formats()<EOL>input_format = import_formats[<EOL>int(confirm_form.cleaned_data['<STR_LIT>'])<EOL>]()<EOL>tmp_storage = self.get_tmp_storage_class()(name=confirm_form.cleaned_data['<STR_LIT>'])<EOL>data = tmp_storage.read(input_format.get_read_mode())<EOL>if not input_format.is_binary() and self.from_encoding:<EOL><INDENT>data = force_text(data, self.from_encoding)<EOL><DEDENT>dataset = input_format.create_dataset(data)<EOL>result = self.process_dataset(dataset, confirm_form, request, *args, **kwargs)<EOL>tmp_storage.remove()<EOL>return self.process_result(result, request)<EOL><DEDENT>
Perform the actual import action (after the user has confirmed the import)