From 9dcf612f9dfae01b1a65864660c289a0ac254707 Mon Sep 17 00:00:00 2001 From: Pavel Puchkin Date: Wed, 18 Apr 2012 23:07:57 +1100 Subject: [PATCH] Fixes after review --- docs/settings.rst | 3 +-- pelican/contents.py | 5 ++++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/settings.rst b/docs/settings.rst index af5f94dd..9cae8111 100644 --- a/docs/settings.rst +++ b/docs/settings.rst @@ -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 -------- diff --git a/pelican/contents.py b/pelican/contents.py index 8174f05a..506c4c02 100644 --- a/pelican/contents.py +++ b/pelican/contents.py @@ -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'))