<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_template_names(self):
 """ Returns a list of template names for the view. :rtype: list. """

        #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)]