add less flag

This commit is contained in:
Bussonnier Matthias 2012-12-23 21:22:29 +01:00 committed by Matthias BUSSONNIER
parent 689922031c
commit d46b6ad3b9
2 changed files with 14 additions and 1 deletions

View File

@ -184,6 +184,10 @@ class AuthenticatedHandler(RequestHandler):
"""
return self.application.read_only
def use_less(self):
"""Use less instead of css in templates"""
return self.application.use_less
@property
def ws_url(self):
"""websocket url matching the current request
@ -296,7 +300,8 @@ class NamedNotebookHandler(AuthenticatedHandler):
read_only=self.read_only,
logged_in=self.logged_in,
login_available=self.login_available,
mathjax_url=self.application.ipython_app.mathjax_url,))
mathjax_url=self.application.ipython_app.mathjax_url,
use_less=self.use_less,))
class PrintNotebookHandler(AuthenticatedHandler):

View File

@ -345,6 +345,14 @@ class NotebookApp(BaseIPythonApplication):
read_only = Bool(False, config=True,
help="Whether to prevent editing/execution of notebooks."
)
use_less = Bool(False, config=True,
help="""Wether to use Browser Side less-css parsing
instead of compiled css version in templates that allows
it. This is mainly convenient when working on the less
file to avoid a build step, or if user want to overwrite
some of the less variables without having to recompile
everything.""")
webapp_settings = Dict(config=True,
help="Supply overrides for the tornado.web.Application that the "