Add basic master view for Report Output data model

This commit is contained in:
Lance Edgar 2017-03-22 14:27:59 -05:00
parent e34bd947bc
commit 6adb99003d
3 changed files with 60 additions and 11 deletions

View file

@ -65,7 +65,7 @@ class FileFieldRenderer(BaseFileFieldRenderer):
if size:
return size
batch = self.field.parent.model
path = os.path.join(self.view.handler.datadir(batch), self.field.value)
path = batch.filepath(self.request.rattail_config, filename=self.field.value)
if os.path.isfile(path):
return os.stat(path)[stat.ST_SIZE]
return 0