def get_template_name(self, template_name_suffix=None):
if isinstance(self.object, models.Model):<EOL><INDENT>meta = self.object._meta<EOL>return self.get_template_path(meta, app_label=meta.app_label, object_name=meta.object_name, template_name_suffix=template_name_suffix)<EOL><DEDENT>elif hasattr(self, '<STR_LIT>') and self.model is not None and issubclass(self.model, models.Model):<EOL><INDENT>meta = self.model._meta<EOL>return self.get_template_path(meta, app_label=meta.app_label, object_name=meta.object_name, template_name_suffix=template_name_suffix)<EOL><DEDENT>
Generates a template path name based on model and app.
:param template_name_suffix: pass a custom suffix or leave empty for default
:return: template path