code: def get_template_names(self):
          
          #noinspection PyUnresolvedReferences
          if self.request.is_ajax():
              template_name = '/results.html'
          else:
              template_name = '/index.html'
  
          return ['{0}{1}'.format(self.template_dir, template_name)]
docs: Returns a list of template names for the view.
  
          :rtype: list.