'Return a list of template names to be used for the request. May not be
called if render_to_response is overridden. Returns the following list:
* the value of ``template_name`` on the view (if provided)
* the contents of the ``template_name_field`` field on the
object instance that the view is operating upon (if available)
* ``<app_label>/<object_name><template_name_suffix>.html``'

def get_template_names(self):

    try:
        names = super(SingleObjectTemplateResponseMixin, self).get_template_names()
    except ImproperlyConfigured:
        names = []
    if (self.object and self.template_name_field):
        name = getattr(self.object, self.template_name_field, None)
        if name:
            names.insert(0, name)
    if isinstance(self.object, models.Model):
        names.append((u'%s/%s%s.html' % (self.object._meta.app_label, self.object._meta.object_name.lower(), self.template_name_suffix)))
    elif (hasattr(self, u'model') and (self.model is not None) and issubclass(self.model, models.Model)):
        names.append((u'%s/%s%s.html' % (self.model._meta.app_label, self.model._meta.object_name.lower(), self.template_name_suffix)))
    return names
