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:
parent
e138b677a2
commit
19b432cdb9
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user