Introduce the DISPLAYED_FIELDS in formatter
This commit is contained in:
parent
b0349f0e8c
commit
30732318b5
4 changed files with 9 additions and 1 deletions
|
|
@ -34,6 +34,7 @@ __all__ = ['Videoob']
|
|||
|
||||
class VideoListFormatter(PrettyFormatter):
|
||||
MANDATORY_FIELDS = ('id', 'title', 'duration', 'date')
|
||||
DISPLAYED_FIELDS = self.MANDATORY_FIELDS + ('author', 'rating')
|
||||
|
||||
def get_title(self, obj):
|
||||
return obj.title
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue