'Use the template defined in the model or a default'

def get_template_names(self):

    names = [self.template_name]
    if (self.object and self.template_name_field):
        name = getattr(self.object, self.template_name_field, None)
        if name:
            names.insert(0, name)
    return names
