Fixes after review

This commit is contained in:
Pavel Puchkin 2012-04-18 23:07:57 +11:00
commit 9dcf612f9d
2 changed files with 5 additions and 3 deletions

View file

@ -142,8 +142,7 @@ Setting name (default value) what does it do?
`TAG_SAVE_AS` ('tag/{name}.html') The location to save the tag page.
================================================ =====================================================
Note: when any of `*_SAVE_AS` setting is set to none-value (including an empty string), files will not be
created.
Note: when any of `*_SAVE_AS` is set to False, files will not be created.
Timezone
--------

View file

@ -183,7 +183,10 @@ class URLWrapper(object):
def _from_settings(self, key):
setting = "%s_%s" % (self.__class__.__name__.upper(), key)
value = self.settings[setting] or ''
value = self.settings[setting]
value = value is not False and value or '' # change to '' only False
if value == '':
logger.warning(u'%s is disabled' % setting)
return unicode(value).format(**self.as_dict())
url = property(functools.partial(_from_settings, key='URL'))