docs: def render_to_response(self, context, **response_kwargs):
          """ Generates the appropriate response. """
          filename = os.path.basename(self.object.file.name)
  
          # Try to guess the content type of the given file
          content_type, _ = mimetypes.guess_type(self.object.file.name)
          if not content_type:
              content_type = 'text/plain'
  
          response = HttpResponse(self.object.file, content_type=content_type)
          response['Content-Disposition'] = 'attachment; filename={}'.format(filename)
  
          return response