establishment back list
This commit is contained in:
parent
35d94e6f76
commit
851c9fc830
|
|
@ -97,6 +97,10 @@ class Review(BaseAttributes, TranslatedFieldsMixin):
|
|||
|
||||
objects = ReviewQuerySet.as_manager()
|
||||
|
||||
@property
|
||||
def status_display(self):
|
||||
return self.REVIEW_STATUSES[self.status][1]
|
||||
|
||||
class Meta:
|
||||
"""Meta class."""
|
||||
verbose_name = _('Review')
|
||||
|
|
|
|||
|
|
@ -4,14 +4,19 @@ from review.models import Review, Inquiries, GridItems
|
|||
|
||||
|
||||
class ReviewBaseSerializer(serializers.ModelSerializer):
|
||||
text_translated = serializers.CharField(read_only=True)
|
||||
status_display = serializers.CharField(read_only=True)
|
||||
|
||||
class Meta:
|
||||
model = Review
|
||||
fields = (
|
||||
'id',
|
||||
'reviewer',
|
||||
'text',
|
||||
'text_translated',
|
||||
'priority',
|
||||
'status',
|
||||
'status_display',
|
||||
'child',
|
||||
'published_at',
|
||||
'vintage',
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user