Nitpick Content decorators

A bit more readable this way.
This commit is contained in:
Anton Antonov 2015-03-17 01:23:29 +02:00 committed by syndbg
commit 875c4a5e05

View file

@ -308,8 +308,13 @@ class Content(object):
"""Dummy function""" """Dummy function"""
pass pass
url = property(functools.partial(get_url_setting, key='url')) @property
save_as = property(functools.partial(get_url_setting, key='save_as')) def url(self):
return self.get_url_setting('url')
@property
def save_as(self):
return self.get_url_setting('save_as')
def _get_template(self): def _get_template(self):
if hasattr(self, 'template') and self.template is not None: if hasattr(self, 'template') and self.template is not None: