def export_admin_action(self, request, queryset):
export_format = request.POST.get('<STR_LIT>')<EOL>if not export_format:<EOL><INDENT>messages.warning(request, _('<STR_LIT>'))<EOL><DEDENT>else:<EOL><INDENT>formats = self.get_export_formats()<EOL>file_format = formats[int(export_format)]()<EOL>export_data = self.get_export_data(file_format, queryset, request=request)<EOL>content_type = file_format.get_content_type()<EOL>response = HttpResponse(export_data, content_type=content_type)<EOL>response['<STR_LIT>'] = '<STR_LIT>' % (<EOL>self.get_export_filename(file_format),<EOL>)<EOL>return response<EOL><DEDENT>
Exports the selected rows using file_format.