Fix definition of DISPLAYED_FIELDS

This commit is contained in:
Florent 2014-06-18 15:34:59 +02:00
commit b105b8df19
2 changed files with 2 additions and 2 deletions

View file

@ -30,7 +30,7 @@ __all__ = ['Boobsize']
class GaugeFormatter(IFormatter): class GaugeFormatter(IFormatter):
MANDATORY_FIELDS = ('name', 'object', 'sensors') MANDATORY_FIELDS = ('name', 'object', 'sensors')
DISPLAYED_FIELDS = self.MANDATORY_FIELDS + ('city', ) DISPLAYED_FIELDS = ('city', )
def start_format(self, **kwargs): def start_format(self, **kwargs):
# Name = 27 Object = 10 City = 10 Sensors = 33 # Name = 27 Object = 10 City = 10 Sensors = 33

View file

@ -34,7 +34,7 @@ __all__ = ['Videoob']
class VideoListFormatter(PrettyFormatter): class VideoListFormatter(PrettyFormatter):
MANDATORY_FIELDS = ('id', 'title', 'duration', 'date') MANDATORY_FIELDS = ('id', 'title', 'duration', 'date')
DISPLAYED_FIELDS = self.MANDATORY_FIELDS + ('author', 'rating') DISPLAYED_FIELDS = ('author', 'rating')
def get_title(self, obj): def get_title(self, obj):
return obj.title return obj.title