add a warning for the users of the LESS_GENERATOR setting

This commit is contained in:
Simon 2012-10-24 23:34:38 +02:00
commit 1b20319074

View file

@ -185,12 +185,17 @@ def configure_settings(settings):
"http://docs.notmyidea.org/alexis/pelican/settings.html#timezone " "http://docs.notmyidea.org/alexis/pelican/settings.html#timezone "
"for more information") "for more information")
if 'LESS_GENERATOR' in settings:
logger.warn("The LESS_GENERATOR setting has been removed in favor "
"of WEBASSETS")
if 'WEBASSETS' in settings and settings['WEBASSETS'] is not False: if 'WEBASSETS' in settings and settings['WEBASSETS'] is not False:
try: try:
from webassets.ext.jinja2 import AssetsExtension from webassets.ext.jinja2 import AssetsExtension
settings['JINJA_EXTENSIONS'].append(AssetsExtension) settings['JINJA_EXTENSIONS'].append(AssetsExtension)
except ImportError: except ImportError:
logger.warn("You must install the webassets module to use WEBASSETS.") logger.warn("You must install the webassets module to use "
"WEBASSETS")
settings['WEBASSETS'] = False settings['WEBASSETS'] = False
if 'OUTPUT_SOURCES_EXTENSION' in settings: if 'OUTPUT_SOURCES_EXTENSION' in settings: