Make model name translated

This commit is contained in:
Kuroshini 2019-10-01 17:11:24 +03:00
parent 1798978cf7
commit 516c4458ac

View File

@ -349,7 +349,9 @@ class Carousel(models.Model):
@property
def model_name(self):
return self.content_object.__class__.__name__
if hasattr(self.content_object, 'establishment_type'):
return self.content_object.establishment_type.name_translated
class Page(models.Model):