'Returns the template name to use for this request.'

def get_template_names(self):

    if self.request.is_ajax():
        template = self.ajax_template_name
    else:
        template = self.template_name
    return template
