mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-27 04:20:22 +08:00
add less flag
This commit is contained in:
parent
689922031c
commit
d46b6ad3b9
@ -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):
|
||||
|
@ -346,6 +346,14 @@ class NotebookApp(BaseIPythonApplication):
|
||||
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 "
|
||||
"IPython notebook uses.")
|
||||
|
Loading…
Reference in New Issue
Block a user