1
0
mirror of https://github.com/sjlongland/tornado-gallery.git synced 2025-09-13 08:42:23 +10:00

gallery: Add metadata property.

This commit is contained in:
Stuart Longland 2018-04-18 19:53:02 +10:00
parent e138b677a2
commit 19b432cdb9
Signed by: stuartl
GPG Key ID: 6AA32EFB18079BAA

View File

@ -165,6 +165,15 @@ class Gallery(Mapping):
def last(self):
return list(self._get_content().keys())[-1]
@property
def meta(self):
return {
'name': self.name,
'title': self.title,
'desc': self.desc,
'content': list(self.keys())
}
# Collection services
@property
def _meta_cache(self):