Show More
@@ -1,387 +1,387 | |||
|
1 | 1 | """A tornado based IPython notebook server. |
|
2 | 2 | |
|
3 | 3 | Authors: |
|
4 | 4 | |
|
5 | 5 | * Brian Granger |
|
6 | 6 | """ |
|
7 | 7 | |
|
8 | 8 | #----------------------------------------------------------------------------- |
|
9 | 9 | # Copyright (C) 2008-2011 The IPython Development Team |
|
10 | 10 | # |
|
11 | 11 | # Distributed under the terms of the BSD License. The full license is in |
|
12 | 12 | # the file COPYING, distributed as part of this software. |
|
13 | 13 | #----------------------------------------------------------------------------- |
|
14 | 14 | |
|
15 | 15 | #----------------------------------------------------------------------------- |
|
16 | 16 | # Imports |
|
17 | 17 | #----------------------------------------------------------------------------- |
|
18 | 18 | |
|
19 | 19 | # stdlib |
|
20 | 20 | import errno |
|
21 | 21 | import logging |
|
22 | 22 | import os |
|
23 | 23 | import signal |
|
24 | 24 | import socket |
|
25 | 25 | import sys |
|
26 | 26 | import threading |
|
27 | 27 | import webbrowser |
|
28 | 28 | |
|
29 | 29 | # Third party |
|
30 | 30 | import zmq |
|
31 | 31 | |
|
32 | 32 | # Install the pyzmq ioloop. This has to be done before anything else from |
|
33 | 33 | # tornado is imported. |
|
34 | 34 | from zmq.eventloop import ioloop |
|
35 | 35 | # FIXME: ioloop.install is new in pyzmq-2.1.7, so remove this conditional |
|
36 | 36 | # when pyzmq dependency is updated beyond that. |
|
37 | 37 | if hasattr(ioloop, 'install'): |
|
38 | 38 | ioloop.install() |
|
39 | 39 | else: |
|
40 | 40 | import tornado.ioloop |
|
41 | 41 | tornado.ioloop.IOLoop = ioloop.IOLoop |
|
42 | 42 | |
|
43 | 43 | from tornado import httpserver |
|
44 | 44 | from tornado import web |
|
45 | 45 | |
|
46 | 46 | # Our own libraries |
|
47 | 47 | from .kernelmanager import MappingKernelManager |
|
48 | 48 | from .handlers import (LoginHandler, LogoutHandler, |
|
49 | 49 | ProjectDashboardHandler, NewHandler, NamedNotebookHandler, |
|
50 | 50 | MainKernelHandler, KernelHandler, KernelActionHandler, IOPubHandler, |
|
51 | 51 | ShellHandler, NotebookRootHandler, NotebookHandler, RSTHandler, |
|
52 | 52 | AuthenticatedFileHandler, |
|
53 | 53 | ) |
|
54 | 54 | from .notebookmanager import NotebookManager |
|
55 | 55 | |
|
56 | 56 | from IPython.config.application import catch_config_error, boolean_flag |
|
57 | 57 | from IPython.core.application import BaseIPythonApplication |
|
58 | 58 | from IPython.core.profiledir import ProfileDir |
|
59 | 59 | from IPython.lib.kernel import swallow_argv |
|
60 | 60 | from IPython.zmq.session import Session, default_secure |
|
61 | 61 | from IPython.zmq.zmqshell import ZMQInteractiveShell |
|
62 | 62 | from IPython.zmq.ipkernel import ( |
|
63 | 63 | flags as ipkernel_flags, |
|
64 | 64 | aliases as ipkernel_aliases, |
|
65 | 65 | IPKernelApp |
|
66 | 66 | ) |
|
67 | 67 | from IPython.utils.traitlets import Dict, Unicode, Integer, List, Enum, Bool |
|
68 | 68 | |
|
69 | 69 | #----------------------------------------------------------------------------- |
|
70 | 70 | # Module globals |
|
71 | 71 | #----------------------------------------------------------------------------- |
|
72 | 72 | |
|
73 | 73 | _kernel_id_regex = r"(?P<kernel_id>\w+-\w+-\w+-\w+-\w+)" |
|
74 | 74 | _kernel_action_regex = r"(?P<action>restart|interrupt)" |
|
75 | 75 | _notebook_id_regex = r"(?P<notebook_id>\w+-\w+-\w+-\w+-\w+)" |
|
76 | 76 | |
|
77 | 77 | LOCALHOST = '127.0.0.1' |
|
78 | 78 | |
|
79 | 79 | _examples = """ |
|
80 | 80 | ipython notebook # start the notebook |
|
81 | 81 | ipython notebook --profile=sympy # use the sympy profile |
|
82 | 82 | ipython notebook --pylab=inline # pylab in inline plotting mode |
|
83 | 83 | ipython notebook --certfile=mycert.pem # use SSL/TLS certificate |
|
84 | 84 | ipython notebook --port=5555 --ip=* # Listen on port 5555, all interfaces |
|
85 | 85 | """ |
|
86 | 86 | |
|
87 | 87 | #----------------------------------------------------------------------------- |
|
88 | 88 | # The Tornado web application |
|
89 | 89 | #----------------------------------------------------------------------------- |
|
90 | 90 | |
|
91 | 91 | class NotebookWebApplication(web.Application): |
|
92 | 92 | |
|
93 | 93 | def __init__(self, ipython_app, kernel_manager, notebook_manager, log, settings_overrides): |
|
94 | 94 | handlers = [ |
|
95 | 95 | (r"/", ProjectDashboardHandler), |
|
96 | 96 | (r"/login", LoginHandler), |
|
97 | 97 | (r"/logout", LogoutHandler), |
|
98 | 98 | (r"/new", NewHandler), |
|
99 | 99 | (r"/%s" % _notebook_id_regex, NamedNotebookHandler), |
|
100 | 100 | (r"/kernels", MainKernelHandler), |
|
101 | 101 | (r"/kernels/%s" % _kernel_id_regex, KernelHandler), |
|
102 | 102 | (r"/kernels/%s/%s" % (_kernel_id_regex, _kernel_action_regex), KernelActionHandler), |
|
103 | 103 | (r"/kernels/%s/iopub" % _kernel_id_regex, IOPubHandler), |
|
104 | 104 | (r"/kernels/%s/shell" % _kernel_id_regex, ShellHandler), |
|
105 | 105 | (r"/notebooks", NotebookRootHandler), |
|
106 | 106 | (r"/notebooks/%s" % _notebook_id_regex, NotebookHandler), |
|
107 | 107 | (r"/rstservice/render", RSTHandler), |
|
108 | 108 | (r"/local/(.*)", AuthenticatedFileHandler, {'path' : notebook_manager.notebook_dir}), |
|
109 | 109 | ] |
|
110 | 110 | settings = dict( |
|
111 | 111 | template_path=os.path.join(os.path.dirname(__file__), "templates"), |
|
112 | 112 | static_path=os.path.join(os.path.dirname(__file__), "static"), |
|
113 | 113 | cookie_secret=os.urandom(1024), |
|
114 | 114 | login_url="/login", |
|
115 | 115 | ) |
|
116 | 116 | |
|
117 | 117 | # allow custom overrides for the tornado web app. |
|
118 | 118 | settings.update(settings_overrides) |
|
119 | 119 | |
|
120 | 120 | super(NotebookWebApplication, self).__init__(handlers, **settings) |
|
121 | 121 | |
|
122 | 122 | self.kernel_manager = kernel_manager |
|
123 | 123 | self.log = log |
|
124 | 124 | self.notebook_manager = notebook_manager |
|
125 | 125 | self.ipython_app = ipython_app |
|
126 | 126 | self.read_only = self.ipython_app.read_only |
|
127 | 127 | |
|
128 | 128 | |
|
129 | 129 | #----------------------------------------------------------------------------- |
|
130 | 130 | # Aliases and Flags |
|
131 | 131 | #----------------------------------------------------------------------------- |
|
132 | 132 | |
|
133 | 133 | flags = dict(ipkernel_flags) |
|
134 | 134 | flags['no-browser']=( |
|
135 | 135 | {'NotebookApp' : {'open_browser' : False}}, |
|
136 | 136 | "Don't open the notebook in a browser after startup." |
|
137 | 137 | ) |
|
138 | 138 | flags['no-mathjax']=( |
|
139 | 139 | {'NotebookApp' : {'enable_mathjax' : False}}, |
|
140 | 140 | """Disable MathJax |
|
141 | 141 | |
|
142 | 142 | MathJax is the javascript library IPython uses to render math/LaTeX. It is |
|
143 | 143 | very large, so you may want to disable it if you have a slow internet |
|
144 | 144 | connection, or for offline use of the notebook. |
|
145 | 145 | |
|
146 | 146 | When disabled, equations etc. will appear as their untransformed TeX source. |
|
147 | 147 | """ |
|
148 | 148 | ) |
|
149 | 149 | flags['read-only'] = ( |
|
150 | 150 | {'NotebookApp' : {'read_only' : True}}, |
|
151 | 151 | """Allow read-only access to notebooks. |
|
152 | 152 | |
|
153 | 153 | When using a password to protect the notebook server, this flag |
|
154 | 154 | allows unauthenticated clients to view the notebook list, and |
|
155 | 155 | individual notebooks, but not edit them, start kernels, or run |
|
156 | 156 | code. |
|
157 | 157 | |
|
158 | 158 | If no password is set, the server will be entirely read-only. |
|
159 | 159 | """ |
|
160 | 160 | ) |
|
161 | 161 | |
|
162 | 162 | # Add notebook manager flags |
|
163 | 163 | flags.update(boolean_flag('script', 'NotebookManager.save_script', |
|
164 | 164 | 'Auto-save a .py script everytime the .ipynb notebook is saved', |
|
165 | 165 | 'Do not auto-save .py scripts for every notebook')) |
|
166 | 166 | |
|
167 | 167 | # the flags that are specific to the frontend |
|
168 | 168 | # these must be scrubbed before being passed to the kernel, |
|
169 | 169 | # or it will raise an error on unrecognized flags |
|
170 | 170 | notebook_flags = ['no-browser', 'no-mathjax', 'read-only', 'script', 'no-script'] |
|
171 | 171 | |
|
172 | 172 | aliases = dict(ipkernel_aliases) |
|
173 | 173 | |
|
174 | 174 | aliases.update({ |
|
175 | 175 | 'ip': 'NotebookApp.ip', |
|
176 | 176 | 'port': 'NotebookApp.port', |
|
177 | 177 | 'keyfile': 'NotebookApp.keyfile', |
|
178 | 178 | 'certfile': 'NotebookApp.certfile', |
|
179 | 179 | 'notebook-dir': 'NotebookManager.notebook_dir', |
|
180 | 180 | }) |
|
181 | 181 | |
|
182 | 182 | # remove ipkernel flags that are singletons, and don't make sense in |
|
183 | 183 | # multi-kernel evironment: |
|
184 | 184 | aliases.pop('f', None) |
|
185 | 185 | |
|
186 | 186 | notebook_aliases = [u'port', u'ip', u'keyfile', u'certfile', |
|
187 | 187 | u'notebook-dir'] |
|
188 | 188 | |
|
189 | 189 | #----------------------------------------------------------------------------- |
|
190 | 190 | # NotebookApp |
|
191 | 191 | #----------------------------------------------------------------------------- |
|
192 | 192 | |
|
193 | 193 | class NotebookApp(BaseIPythonApplication): |
|
194 | 194 | |
|
195 | 195 | name = 'ipython-notebook' |
|
196 | 196 | default_config_file_name='ipython_notebook_config.py' |
|
197 | 197 | |
|
198 | 198 | description = """ |
|
199 | 199 | The IPython HTML Notebook. |
|
200 | 200 | |
|
201 | 201 | This launches a Tornado based HTML Notebook Server that serves up an |
|
202 | 202 | HTML5/Javascript Notebook client. |
|
203 | 203 | """ |
|
204 | 204 | examples = _examples |
|
205 | 205 | |
|
206 | 206 | classes = [IPKernelApp, ZMQInteractiveShell, ProfileDir, Session, |
|
207 | 207 | MappingKernelManager, NotebookManager] |
|
208 | 208 | flags = Dict(flags) |
|
209 | 209 | aliases = Dict(aliases) |
|
210 | 210 | |
|
211 | 211 | kernel_argv = List(Unicode) |
|
212 | 212 | |
|
213 | 213 | log_level = Enum((0,10,20,30,40,50,'DEBUG','INFO','WARN','ERROR','CRITICAL'), |
|
214 | 214 | default_value=logging.INFO, |
|
215 | 215 | config=True, |
|
216 | 216 | help="Set the log level by value or name.") |
|
217 | 217 | |
|
218 | 218 | # Network related information. |
|
219 | 219 | |
|
220 | 220 | ip = Unicode(LOCALHOST, config=True, |
|
221 | 221 | help="The IP address the notebook server will listen on." |
|
222 | 222 | ) |
|
223 | 223 | |
|
224 | 224 | def _ip_changed(self, name, old, new): |
|
225 | 225 | if new == u'*': self.ip = u'' |
|
226 | 226 | |
|
227 | 227 | port = Integer(8888, config=True, |
|
228 | 228 | help="The port the notebook server will listen on." |
|
229 | 229 | ) |
|
230 | 230 | |
|
231 | 231 | certfile = Unicode(u'', config=True, |
|
232 | 232 | help="""The full path to an SSL/TLS certificate file.""" |
|
233 | 233 | ) |
|
234 | 234 | |
|
235 | 235 | keyfile = Unicode(u'', config=True, |
|
236 | 236 | help="""The full path to a private key file for usage with SSL/TLS.""" |
|
237 | 237 | ) |
|
238 | 238 | |
|
239 | 239 | password = Unicode(u'', config=True, |
|
240 | 240 | help="""Hashed password to use for web authentication. |
|
241 | 241 | |
|
242 | 242 | To generate, type in a python/IPython shell: |
|
243 | 243 | |
|
244 | 244 | from IPython.lib import passwd; passwd() |
|
245 | 245 | |
|
246 | 246 | The string should be of the form type:salt:hashed-password. |
|
247 | 247 | """ |
|
248 | 248 | ) |
|
249 | 249 | |
|
250 | 250 | open_browser = Bool(True, config=True, |
|
251 | 251 | help="Whether to open in a browser after starting.") |
|
252 | 252 | |
|
253 | 253 | read_only = Bool(False, config=True, |
|
254 | 254 | help="Whether to prevent editing/execution of notebooks." |
|
255 | 255 | ) |
|
256 | 256 | |
|
257 | 257 | webapp_settings = Dict(config=True, |
|
258 | 258 | help="Supply overrides for the tornado.web.Application that the " |
|
259 | 259 | "IPython notebook uses.") |
|
260 | 260 | |
|
261 | 261 | enable_mathjax = Bool(True, config=True, |
|
262 | 262 | help="""Whether to enable MathJax for typesetting math/TeX |
|
263 | 263 | |
|
264 | 264 | MathJax is the javascript library IPython uses to render math/LaTeX. It is |
|
265 | 265 | very large, so you may want to disable it if you have a slow internet |
|
266 | 266 | connection, or for offline use of the notebook. |
|
267 | 267 | |
|
268 | 268 | When disabled, equations etc. will appear as their untransformed TeX source. |
|
269 | 269 | """ |
|
270 | 270 | ) |
|
271 | 271 | def _enable_mathjax_changed(self, name, old, new): |
|
272 | 272 | """set mathjax url to empty if mathjax is disabled""" |
|
273 | 273 | if not new: |
|
274 | 274 | self.mathjax_url = u'' |
|
275 | 275 | |
|
276 | 276 | mathjax_url = Unicode("", config=True, |
|
277 | 277 | help="""The url for MathJax.js.""" |
|
278 | 278 | ) |
|
279 | 279 | def _mathjax_url_default(self): |
|
280 | 280 | if not self.enable_mathjax: |
|
281 | 281 | return u'' |
|
282 | 282 | static_path = self.webapp_settings.get("static_path", os.path.join(os.path.dirname(__file__), "static")) |
|
283 | 283 | if os.path.exists(os.path.join(static_path, 'mathjax', "MathJax.js")): |
|
284 | 284 | self.log.info("Using local MathJax") |
|
285 | return u"static/mathjax/MathJax.js" | |
|
285 | return u"/static/mathjax/MathJax.js" | |
|
286 | 286 | else: |
|
287 | 287 | self.log.info("Using MathJax from CDN") |
|
288 | 288 | return u"http://cdn.mathjax.org/mathjax/latest/MathJax.js" |
|
289 | 289 | |
|
290 | 290 | def _mathjax_url_changed(self, name, old, new): |
|
291 | 291 | if new and not self.enable_mathjax: |
|
292 | 292 | # enable_mathjax=False overrides mathjax_url |
|
293 | 293 | self.mathjax_url = u'' |
|
294 | 294 | else: |
|
295 | 295 | self.log.info("Using MathJax: %s", new) |
|
296 | 296 | |
|
297 | 297 | def parse_command_line(self, argv=None): |
|
298 | 298 | super(NotebookApp, self).parse_command_line(argv) |
|
299 | 299 | if argv is None: |
|
300 | 300 | argv = sys.argv[1:] |
|
301 | 301 | |
|
302 | 302 | # Scrub frontend-specific flags |
|
303 | 303 | self.kernel_argv = swallow_argv(argv, notebook_aliases, notebook_flags) |
|
304 | 304 | # Kernel should inherit default config file from frontend |
|
305 | 305 | self.kernel_argv.append("--KernelApp.parent_appname='%s'"%self.name) |
|
306 | 306 | |
|
307 | 307 | def init_configurables(self): |
|
308 | 308 | # Don't let Qt or ZMQ swallow KeyboardInterupts. |
|
309 | 309 | signal.signal(signal.SIGINT, signal.SIG_DFL) |
|
310 | 310 | |
|
311 | 311 | # force Session default to be secure |
|
312 | 312 | default_secure(self.config) |
|
313 | 313 | # Create a KernelManager and start a kernel. |
|
314 | 314 | self.kernel_manager = MappingKernelManager( |
|
315 | 315 | config=self.config, log=self.log, kernel_argv=self.kernel_argv, |
|
316 | 316 | connection_dir = self.profile_dir.security_dir, |
|
317 | 317 | ) |
|
318 | 318 | self.notebook_manager = NotebookManager(config=self.config, log=self.log) |
|
319 | 319 | self.notebook_manager.list_notebooks() |
|
320 | 320 | |
|
321 | 321 | def init_logging(self): |
|
322 | 322 | super(NotebookApp, self).init_logging() |
|
323 | 323 | # This prevents double log messages because tornado use a root logger that |
|
324 | 324 | # self.log is a child of. The logging module dipatches log messages to a log |
|
325 | 325 | # and all of its ancenstors until propagate is set to False. |
|
326 | 326 | self.log.propagate = False |
|
327 | 327 | |
|
328 | 328 | @catch_config_error |
|
329 | 329 | def initialize(self, argv=None): |
|
330 | 330 | super(NotebookApp, self).initialize(argv) |
|
331 | 331 | self.init_configurables() |
|
332 | 332 | self.web_app = NotebookWebApplication( |
|
333 | 333 | self, self.kernel_manager, self.notebook_manager, self.log, |
|
334 | 334 | self.webapp_settings |
|
335 | 335 | ) |
|
336 | 336 | if self.certfile: |
|
337 | 337 | ssl_options = dict(certfile=self.certfile) |
|
338 | 338 | if self.keyfile: |
|
339 | 339 | ssl_options['keyfile'] = self.keyfile |
|
340 | 340 | else: |
|
341 | 341 | ssl_options = None |
|
342 | 342 | self.web_app.password = self.password |
|
343 | 343 | self.http_server = httpserver.HTTPServer(self.web_app, ssl_options=ssl_options) |
|
344 | 344 | if ssl_options is None and not self.ip: |
|
345 | 345 | self.log.critical('WARNING: the notebook server is listening on all IP addresses ' |
|
346 | 346 | 'but not using any encryption or authentication. This is highly ' |
|
347 | 347 | 'insecure and not recommended.') |
|
348 | 348 | |
|
349 | 349 | # Try random ports centered around the default. |
|
350 | 350 | from random import randint |
|
351 | 351 | n = 50 # Max number of attempts, keep reasonably large. |
|
352 | 352 | for port in range(self.port, self.port+5) + [self.port + randint(-2*n, 2*n) for i in range(n-5)]: |
|
353 | 353 | try: |
|
354 | 354 | self.http_server.listen(port, self.ip) |
|
355 | 355 | except socket.error, e: |
|
356 | 356 | if e.errno != errno.EADDRINUSE: |
|
357 | 357 | raise |
|
358 | 358 | self.log.info('The port %i is already in use, trying another random port.' % port) |
|
359 | 359 | else: |
|
360 | 360 | self.port = port |
|
361 | 361 | break |
|
362 | 362 | |
|
363 | 363 | def start(self): |
|
364 | 364 | ip = self.ip if self.ip else '[all ip addresses on your system]' |
|
365 | 365 | proto = 'https' if self.certfile else 'http' |
|
366 | 366 | info = self.log.info |
|
367 | 367 | info("The IPython Notebook is running at: %s://%s:%i" % |
|
368 | 368 | (proto, ip, self.port) ) |
|
369 | 369 | info("Use Control-C to stop this server and shut down all kernels.") |
|
370 | 370 | |
|
371 | 371 | if self.open_browser: |
|
372 | 372 | ip = self.ip or '127.0.0.1' |
|
373 | 373 | b = lambda : webbrowser.open("%s://%s:%i" % (proto, ip, self.port), |
|
374 | 374 | new=2) |
|
375 | 375 | threading.Thread(target=b).start() |
|
376 | 376 | |
|
377 | 377 | ioloop.IOLoop.instance().start() |
|
378 | 378 | |
|
379 | 379 | #----------------------------------------------------------------------------- |
|
380 | 380 | # Main entry point |
|
381 | 381 | #----------------------------------------------------------------------------- |
|
382 | 382 | |
|
383 | 383 | def launch_new_instance(): |
|
384 | 384 | app = NotebookApp() |
|
385 | 385 | app.initialize() |
|
386 | 386 | app.start() |
|
387 | 387 |
@@ -1,85 +1,85 | |||
|
1 | 1 | <!DOCTYPE HTML> |
|
2 | 2 | <html> |
|
3 | 3 | |
|
4 | 4 | <head> |
|
5 | 5 | <meta charset="utf-8"> |
|
6 | 6 | |
|
7 | 7 | <title>{% block title %}IPython Notebook{% end %}</title> |
|
8 | 8 | |
|
9 | <link rel="stylesheet" href="static/jquery/css/themes/aristo/jquery-wijmo.css" type="text/css" /> | |
|
10 | <link rel="stylesheet" href="static/css/boilerplate.css" type="text/css" /> | |
|
11 | <link rel="stylesheet" href="static/css/layout.css" type="text/css" /> | |
|
12 | <link rel="stylesheet" href="static/css/base.css" type="text/css"/> | |
|
9 | <link rel="stylesheet" href="/static/jquery/css/themes/aristo/jquery-wijmo.css" type="text/css" /> | |
|
10 | <link rel="stylesheet" href="/static/css/boilerplate.css" type="text/css" /> | |
|
11 | <link rel="stylesheet" href="/static/css/layout.css" type="text/css" /> | |
|
12 | <link rel="stylesheet" href="/static/css/base.css" type="text/css"/> | |
|
13 | 13 | {% block stylesheet %} |
|
14 | 14 | {% end %} |
|
15 | 15 | |
|
16 | 16 | {% block meta %} |
|
17 | 17 | {% end %} |
|
18 | 18 | |
|
19 | 19 | </head> |
|
20 | 20 | |
|
21 | 21 | <body {% block params %}{% end %}> |
|
22 | 22 | |
|
23 | 23 | <div id="header"> |
|
24 | <span id="ipython_notebook"><h1><img src='static/ipynblogo.png' alt='IPython Notebook'/></h1></span> | |
|
24 | <span id="ipython_notebook"><h1><img src='/static/ipynblogo.png' alt='IPython Notebook'/></h1></span> | |
|
25 | 25 | |
|
26 | 26 | {% block login_widget %} |
|
27 | 27 | |
|
28 | 28 | <span id="login_widget"> |
|
29 | 29 | {% if logged_in %} |
|
30 | 30 | <button id="logout">Logout</button> |
|
31 | 31 | {% elif login_available and not logged_in %} |
|
32 | 32 | <button id="login">Login</button> |
|
33 | 33 | {% end %} |
|
34 | 34 | </span> |
|
35 | 35 | |
|
36 | 36 | {% end %} |
|
37 | 37 | |
|
38 | 38 | {% block header %} |
|
39 | 39 | {% end %} |
|
40 | 40 | </div> |
|
41 | 41 | |
|
42 | 42 | <div id="header_border"></div> |
|
43 | 43 | |
|
44 | 44 | <div id="main_app"> |
|
45 | 45 | |
|
46 | 46 | <div id="app_hbox"> |
|
47 | 47 | |
|
48 | 48 | <div id="left_panel"> |
|
49 | 49 | {% block left_panel %} |
|
50 | 50 | {% end %} |
|
51 | 51 | </div> |
|
52 | 52 | |
|
53 | 53 | <div id="content_panel"> |
|
54 | 54 | {% if message %} |
|
55 | 55 | |
|
56 | 56 | {% for key in message %} |
|
57 | 57 | <div class="message {{key}}"> |
|
58 | 58 | {{message[key]}} |
|
59 | 59 | </div> |
|
60 | 60 | {% end %} |
|
61 | 61 | {% end %} |
|
62 | 62 | |
|
63 | 63 | {% block content_panel %} |
|
64 | 64 | {% end %} |
|
65 | 65 | </div> |
|
66 | 66 | <div id="right_panel"> |
|
67 | 67 | {% block right_panel %} |
|
68 | 68 | {% end %} |
|
69 | 69 | </div> |
|
70 | 70 | |
|
71 | 71 | </div> |
|
72 | 72 | |
|
73 | 73 | </div> |
|
74 | 74 | |
|
75 | <script src="static/jquery/js/jquery-1.6.2.min.js" type="text/javascript" charset="utf-8"></script> | |
|
76 | <script src="static/jquery/js/jquery-ui-1.8.14.custom.min.js" type="text/javascript" charset="utf-8"></script> | |
|
77 | <script src="static/js/namespace.js" type="text/javascript" charset="utf-8"></script> | |
|
78 | <script src="static/js/loginmain.js" type="text/javascript" charset="utf-8"></script> | |
|
79 | <script src="static/js/loginwidget.js" type="text/javascript" charset="utf-8"></script> | |
|
75 | <script src="/static/jquery/js/jquery-1.6.2.min.js" type="text/javascript" charset="utf-8"></script> | |
|
76 | <script src="/static/jquery/js/jquery-ui-1.8.14.custom.min.js" type="text/javascript" charset="utf-8"></script> | |
|
77 | <script src="/static/js/namespace.js" type="text/javascript" charset="utf-8"></script> | |
|
78 | <script src="/static/js/loginmain.js" type="text/javascript" charset="utf-8"></script> | |
|
79 | <script src="/static/js/loginwidget.js" type="text/javascript" charset="utf-8"></script> | |
|
80 | 80 | {% block script %} |
|
81 | 81 | {% end %} |
|
82 | 82 | |
|
83 | 83 | </body> |
|
84 | 84 | |
|
85 | 85 | </html> |
@@ -1,298 +1,298 | |||
|
1 | 1 | <!DOCTYPE HTML> |
|
2 | 2 | <html> |
|
3 | 3 | |
|
4 | 4 | <head> |
|
5 | 5 | <meta charset="utf-8"> |
|
6 | 6 | |
|
7 | 7 | <title>IPython Notebook</title> |
|
8 | 8 | |
|
9 | 9 | {% if mathjax_url %} |
|
10 | 10 | <script type="text/javascript" src="{{mathjax_url}}?config=TeX-AMS_HTML" charset="utf-8"></script> |
|
11 | 11 | {% end %} |
|
12 | 12 | <script type="text/javascript"> |
|
13 | 13 | // MathJax disabled, set as null to distingish from *missing* MathJax, |
|
14 | 14 | // where it will be undefined, and should prompt a dialog later. |
|
15 | 15 | window.mathjax_url = "{{mathjax_url}}"; |
|
16 | 16 | </script> |
|
17 | 17 | |
|
18 | <link rel="stylesheet" href="static/jquery/css/themes/aristo/jquery-wijmo.css" type="text/css" /> | |
|
19 | <link rel="stylesheet" href="static/codemirror/lib/codemirror.css"> | |
|
20 | <link rel="stylesheet" href="static/codemirror/mode/markdown/markdown.css"> | |
|
21 | <link rel="stylesheet" href="static/codemirror/mode/rst/rst.css"> | |
|
22 | <link rel="stylesheet" href="static/codemirror/theme/ipython.css"> | |
|
23 | <link rel="stylesheet" href="static/codemirror/theme/default.css"> | |
|
18 | <link rel="stylesheet" href="/static/jquery/css/themes/aristo/jquery-wijmo.css" type="text/css" /> | |
|
19 | <link rel="stylesheet" href="/static/codemirror/lib/codemirror.css"> | |
|
20 | <link rel="stylesheet" href="/static/codemirror/mode/markdown/markdown.css"> | |
|
21 | <link rel="stylesheet" href="/static/codemirror/mode/rst/rst.css"> | |
|
22 | <link rel="stylesheet" href="/static/codemirror/theme/ipython.css"> | |
|
23 | <link rel="stylesheet" href="/static/codemirror/theme/default.css"> | |
|
24 | 24 | |
|
25 | <link rel="stylesheet" href="static/prettify/prettify.css"/> | |
|
25 | <link rel="stylesheet" href="/static/prettify/prettify.css"/> | |
|
26 | 26 | |
|
27 | <link rel="stylesheet" href="static/css/boilerplate.css" type="text/css" /> | |
|
28 | <link rel="stylesheet" href="static/css/layout.css" type="text/css" /> | |
|
29 | <link rel="stylesheet" href="static/css/base.css" type="text/css" /> | |
|
30 | <link rel="stylesheet" href="static/css/notebook.css" type="text/css" /> | |
|
31 | <link rel="stylesheet" href="static/css/renderedhtml.css" type="text/css" /> | |
|
27 | <link rel="stylesheet" href="/static/css/boilerplate.css" type="text/css" /> | |
|
28 | <link rel="stylesheet" href="/static/css/layout.css" type="text/css" /> | |
|
29 | <link rel="stylesheet" href="/static/css/base.css" type="text/css" /> | |
|
30 | <link rel="stylesheet" href="/static/css/notebook.css" type="text/css" /> | |
|
31 | <link rel="stylesheet" href="/static/css/renderedhtml.css" type="text/css" /> | |
|
32 | 32 | |
|
33 | 33 | {% comment In the notebook, the read-only flag is used to determine %} |
|
34 | 34 | {% comment whether to hide the side panels and switch off input %} |
|
35 | 35 | <meta name="read_only" content="{{read_only and not logged_in}}"/> |
|
36 | 36 | |
|
37 | 37 | </head> |
|
38 | 38 | |
|
39 | 39 | <body |
|
40 | 40 | data-project={{project}} data-notebook-id={{notebook_id}} |
|
41 | 41 | data-base-project-url={{base_project_url}} data-base-kernel-url={{base_kernel_url}} |
|
42 | 42 | > |
|
43 | 43 | |
|
44 | 44 | <div id="header"> |
|
45 | <span id="ipython_notebook"><h1><a href='..' alt='dashboard'><img src='static/ipynblogo.png' alt='IPython Notebook'/></a></h1></span> | |
|
45 | <span id="ipython_notebook"><h1><a href='..' alt='dashboard'><img src='/static/ipynblogo.png' alt='IPython Notebook'/></a></h1></span> | |
|
46 | 46 | <span id="save_widget"> |
|
47 | 47 | <input type="text" id="notebook_name" size="20"></textarea> |
|
48 | 48 | <button id="save_notebook"><u>S</u>ave</button> |
|
49 | 49 | </span> |
|
50 | 50 | <span id="quick_help_area"> |
|
51 | 51 | <button id="quick_help">Quick<u>H</u>elp</button> |
|
52 | 52 | </span> |
|
53 | 53 | |
|
54 | 54 | <span id="login_widget"> |
|
55 | 55 | {% comment This is a temporary workaround to hide the logout button %} |
|
56 | 56 | {% comment when appropriate until notebook.html is templated %} |
|
57 | 57 | {% if logged_in %} |
|
58 | 58 | <button id="logout">Logout</button> |
|
59 | 59 | {% elif not logged_in and login_available %} |
|
60 | 60 | <button id="login">Login</button> |
|
61 | 61 | {% end %} |
|
62 | 62 | </span> |
|
63 | 63 | |
|
64 | 64 | <span id="kernel_status">Idle</span> |
|
65 | 65 | </div> |
|
66 | 66 | |
|
67 | 67 | <div id="main_app"> |
|
68 | 68 | |
|
69 | 69 | <div id="left_panel"> |
|
70 | 70 | |
|
71 | 71 | <div id="notebook_section"> |
|
72 | 72 | <div class="section_header"> |
|
73 | 73 | <h3>Notebook</h3> |
|
74 | 74 | </div> |
|
75 | 75 | <div class="section_content"> |
|
76 | 76 | <div class="section_row"> |
|
77 | 77 | <span id="new_open" class="section_row_buttons"> |
|
78 | 78 | <button id="new_notebook">New</button> |
|
79 | 79 | <button id="open_notebook">Open</button> |
|
80 | 80 | </span> |
|
81 | 81 | <span class="section_row_header">Actions</span> |
|
82 | 82 | </div> |
|
83 | 83 | <div class="section_row"> |
|
84 | 84 | <span> |
|
85 | 85 | <select id="download_format"> |
|
86 | 86 | <option value="json">ipynb</option> |
|
87 | 87 | <option value="py">py</option> |
|
88 | 88 | </select> |
|
89 | 89 | </span> |
|
90 | 90 | <span class="section_row_buttons"> |
|
91 | 91 | <button id="download_notebook">Download</button> |
|
92 | 92 | </span> |
|
93 | 93 | </div> |
|
94 | 94 | <div class="section_row"> |
|
95 | 95 | <span class="section_row_buttons"> |
|
96 | 96 | <span id="print_widget"> |
|
97 | 97 | <button id="print_notebook">Print</button> |
|
98 | 98 | </span> |
|
99 | 99 | </span> |
|
100 | 100 | </div> |
|
101 | 101 | </div> |
|
102 | 102 | </div> |
|
103 | 103 | |
|
104 | 104 | <div id="cell_section"> |
|
105 | 105 | <div class="section_header"> |
|
106 | 106 | <h3>Cell</h3> |
|
107 | 107 | </div> |
|
108 | 108 | <div class="section_content"> |
|
109 | 109 | <div class="section_row"> |
|
110 | 110 | <span class="section_row_buttons"> |
|
111 | 111 | <button id="delete_cell"><u>D</u>elete</button> |
|
112 | 112 | </span> |
|
113 | 113 | <span class="section_row_header">Actions</span> |
|
114 | 114 | </div> |
|
115 | 115 | <div class="section_row"> |
|
116 | 116 | <span id="cell_type" class="section_row_buttons"> |
|
117 | 117 | <button id="to_code"><u>C</u>ode</button> |
|
118 | 118 | <!-- <button id="to_html">HTML</button>--> |
|
119 | 119 | <button id="to_markdown"><u>M</u>arkdown</button> |
|
120 | 120 | </span> |
|
121 | 121 | <span class="button_label">Format</span> |
|
122 | 122 | </div> |
|
123 | 123 | <div class="section_row"> |
|
124 | 124 | <span id="cell_output" class="section_row_buttons"> |
|
125 | 125 | <button id="toggle_output"><u>T</u>oggle</button> |
|
126 | 126 | <button id="clear_all_output">ClearAll</button> |
|
127 | 127 | </span> |
|
128 | 128 | <span class="button_label">Output</span> |
|
129 | 129 | </div> |
|
130 | 130 | <div class="section_row"> |
|
131 | 131 | <span id="insert" class="section_row_buttons"> |
|
132 | 132 | <button id="insert_cell_above"><u>A</u>bove</button> |
|
133 | 133 | <button id="insert_cell_below"><u>B</u>elow</button> |
|
134 | 134 | </span> |
|
135 | 135 | <span class="button_label">Insert</span> |
|
136 | 136 | </div> |
|
137 | 137 | <div class="section_row"> |
|
138 | 138 | <span id="move" class="section_row_buttons"> |
|
139 | 139 | <button id="move_cell_up">Up</button> |
|
140 | 140 | <button id="move_cell_down">Down</button> |
|
141 | 141 | </span> |
|
142 | 142 | <span class="button_label">Move</span> |
|
143 | 143 | </div> |
|
144 | 144 | <div class="section_row"> |
|
145 | 145 | <span id="run_cells" class="section_row_buttons"> |
|
146 | 146 | <button id="run_selected_cell">Selected</button> |
|
147 | 147 | <button id="run_all_cells">All</button> |
|
148 | 148 | </span> |
|
149 | 149 | <span class="button_label">Run</span> |
|
150 | 150 | </div> |
|
151 | 151 | <div class="section_row"> |
|
152 | 152 | <span id="autoindent_span"> |
|
153 | 153 | <input type="checkbox" id="autoindent" checked="true"></input> |
|
154 | 154 | </span> |
|
155 | 155 | <span class="checkbox_label" id="autoindent_label">Autoindent:</span> |
|
156 | 156 | </div> |
|
157 | 157 | </div> |
|
158 | 158 | </div> |
|
159 | 159 | |
|
160 | 160 | <div id="kernel_section"> |
|
161 | 161 | <div class="section_header"> |
|
162 | 162 | <h3>Kernel</h3> |
|
163 | 163 | </div> |
|
164 | 164 | <div class="section_content"> |
|
165 | 165 | <div class="section_row"> |
|
166 | 166 | <span id="int_restart" class="section_row_buttons"> |
|
167 | 167 | <button id="int_kernel"><u>I</u>nterrupt</button> |
|
168 | 168 | <button id="restart_kernel">Restart</button> |
|
169 | 169 | </span> |
|
170 | 170 | <span class="section_row_header">Actions</span> |
|
171 | 171 | </div> |
|
172 | 172 | <div class="section_row"> |
|
173 | 173 | <span id="kernel_persist"> |
|
174 | 174 | {% if kill_kernel %} |
|
175 | 175 | <input type="checkbox" id="kill_kernel" checked="true"></input> |
|
176 | 176 | {% else %} |
|
177 | 177 | <input type="checkbox" id="kill_kernel"></input> |
|
178 | 178 | {% end %} |
|
179 | 179 | </span> |
|
180 | 180 | <span class="checkbox_label" id="kill_kernel_label">Kill kernel upon exit:</span> |
|
181 | 181 | </div> |
|
182 | 182 | </div> |
|
183 | 183 | </div> |
|
184 | 184 | |
|
185 | 185 | <div id="help_section"> |
|
186 | 186 | <div class="section_header"> |
|
187 | 187 | <h3>Help</h3> |
|
188 | 188 | </div> |
|
189 | 189 | <div class="section_content"> |
|
190 | 190 | <div class="section_row"> |
|
191 | 191 | <span id="help_buttons0" class="section_row_buttons"> |
|
192 | 192 | <a id="python_help" href="http://docs.python.org" target="_blank">Python</a> |
|
193 | 193 | <a id="ipython_help" href="http://ipython.org/documentation.html" target="_blank">IPython</a> |
|
194 | 194 | </span> |
|
195 | 195 | <span class="section_row_header">Links</span> |
|
196 | 196 | </div> |
|
197 | 197 | <div class="section_row"> |
|
198 | 198 | <span id="help_buttons1" class="section_row_buttons"> |
|
199 | 199 | <a id="numpy_help" href="http://docs.scipy.org/doc/numpy/reference/" target="_blank">NumPy</a> |
|
200 | 200 | <a id="scipy_help" href="http://docs.scipy.org/doc/scipy/reference/" target="_blank">SciPy</a> |
|
201 | 201 | </span> |
|
202 | 202 | </div> |
|
203 | 203 | <div class="section_row"> |
|
204 | 204 | <span id="help_buttons2" class="section_row_buttons"> |
|
205 | 205 | <a id="matplotlib_help" href="http://matplotlib.sourceforge.net/" target="_blank">MPL</a> |
|
206 | 206 | <a id="sympy_help" href="http://docs.sympy.org/dev/index.html" target="_blank">SymPy</a> |
|
207 | 207 | </span> |
|
208 | 208 | </div> |
|
209 | 209 | <div class="section_row"> |
|
210 | 210 | <span class="help_string">run selected cell</span> |
|
211 | 211 | <span class="help_string_label">Shift-Enter :</span> |
|
212 | 212 | </div> |
|
213 | 213 | <div class="section_row"> |
|
214 | 214 | <span class="help_string">run selected cell in-place</span> |
|
215 | 215 | <span class="help_string_label">Ctrl-Enter :</span> |
|
216 | 216 | </div> |
|
217 | 217 | <div class="section_row"> |
|
218 | 218 | <span class="help_string">show keyboard shortcuts</span> |
|
219 | 219 | <span class="help_string_label">Ctrl-m h :</span> |
|
220 | 220 | </div> |
|
221 | 221 | </div> |
|
222 | 222 | </div> |
|
223 | 223 | |
|
224 | 224 | <div id="config_section"> |
|
225 | 225 | <div class="section_header"> |
|
226 | 226 | <h3>Configuration</h3> |
|
227 | 227 | </div> |
|
228 | 228 | <div class="section_content"> |
|
229 | 229 | <div class="section_row"> |
|
230 | 230 | <span id="tooltipontab_span"> |
|
231 | 231 | <input type="checkbox" id="tooltipontab" checked="true"></input> |
|
232 | 232 | </span> |
|
233 | 233 | <span class="checkbox_label" id="tooltipontab_label">Tooltip on tab:</span> |
|
234 | 234 | </div> |
|
235 | 235 | <div class="section_row"> |
|
236 | 236 | <span id="smartcompleter_span"> |
|
237 | 237 | <input type="checkbox" id="smartcompleter" checked="true"></input> |
|
238 | 238 | </span> |
|
239 | 239 | <span class="checkbox_label" id="smartcompleter_label">Smart completer:</span> |
|
240 | 240 | </div> |
|
241 | 241 | <div class="section_row"> |
|
242 | 242 | <span id="timebeforetooltip_span"> |
|
243 | 243 | <input type="text" id="timebeforetooltip" value="1200" size='6'></input> |
|
244 | 244 | <span class="numeric_input_label" id="timebeforetooltip_unit">milliseconds</span> |
|
245 | 245 | </span> |
|
246 | 246 | <span class="numeric_input_label" id="timebeforetooltip_label">Time before tooltip : </span> |
|
247 | 247 | </div> |
|
248 | 248 | </div> |
|
249 | 249 | </div> |
|
250 | 250 | |
|
251 | 251 | </div> |
|
252 | 252 | <div id="left_panel_splitter"></div> |
|
253 | 253 | <div id="notebook_panel"> |
|
254 | 254 | <div id="notebook"></div> |
|
255 | 255 | <div id="pager_splitter"></div> |
|
256 | 256 | <div id="pager"></div> |
|
257 | 257 | </div> |
|
258 | 258 | |
|
259 | 259 | </div> |
|
260 | 260 | |
|
261 | <script src="static/jquery/js/jquery-1.6.2.min.js" type="text/javascript" charset="utf-8"></script> | |
|
262 | <script src="static/jquery/js/jquery-ui-1.8.14.custom.min.js" type="text/javascript" charset="utf-8"></script> | |
|
263 | <script src="static/jquery/js/jquery.autogrow.js" type="text/javascript" charset="utf-8"></script> | |
|
261 | <script src="/static/jquery/js/jquery-1.6.2.min.js" type="text/javascript" charset="utf-8"></script> | |
|
262 | <script src="/static/jquery/js/jquery-ui-1.8.14.custom.min.js" type="text/javascript" charset="utf-8"></script> | |
|
263 | <script src="/static/jquery/js/jquery.autogrow.js" type="text/javascript" charset="utf-8"></script> | |
|
264 | 264 | |
|
265 | <script src="static/codemirror/lib/codemirror.js" charset="utf-8"></script> | |
|
266 | <script src="static/codemirror/mode/python/python.js" charset="utf-8"></script> | |
|
267 | <script src="static/codemirror/mode/htmlmixed/htmlmixed.js" charset="utf-8"></script> | |
|
268 | <script src="static/codemirror/mode/xml/xml.js" charset="utf-8"></script> | |
|
269 | <script src="static/codemirror/mode/javascript/javascript.js" charset="utf-8"></script> | |
|
270 | <script src="static/codemirror/mode/css/css.js" charset="utf-8"></script> | |
|
271 | <script src="static/codemirror/mode/rst/rst.js" charset="utf-8"></script> | |
|
272 | <script src="static/codemirror/mode/markdown/markdown.js" charset="utf-8"></script> | |
|
265 | <script src="/static/codemirror/lib/codemirror.js" charset="utf-8"></script> | |
|
266 | <script src="/static/codemirror/mode/python/python.js" charset="utf-8"></script> | |
|
267 | <script src="/static/codemirror/mode/htmlmixed/htmlmixed.js" charset="utf-8"></script> | |
|
268 | <script src="/static/codemirror/mode/xml/xml.js" charset="utf-8"></script> | |
|
269 | <script src="/static/codemirror/mode/javascript/javascript.js" charset="utf-8"></script> | |
|
270 | <script src="/static/codemirror/mode/css/css.js" charset="utf-8"></script> | |
|
271 | <script src="/static/codemirror/mode/rst/rst.js" charset="utf-8"></script> | |
|
272 | <script src="/static/codemirror/mode/markdown/markdown.js" charset="utf-8"></script> | |
|
273 | 273 | |
|
274 | <script src="static/pagedown/Markdown.Converter.js" charset="utf-8"></script> | |
|
274 | <script src="/static/pagedown/Markdown.Converter.js" charset="utf-8"></script> | |
|
275 | 275 | |
|
276 | <script src="static/prettify/prettify.js" charset="utf-8"></script> | |
|
276 | <script src="/static/prettify/prettify.js" charset="utf-8"></script> | |
|
277 | 277 | |
|
278 | <script src="static/js/namespace.js" type="text/javascript" charset="utf-8"></script> | |
|
279 | <script src="static/js/utils.js" type="text/javascript" charset="utf-8"></script> | |
|
280 | <script src="static/js/cell.js" type="text/javascript" charset="utf-8"></script> | |
|
281 | <script src="static/js/codecell.js" type="text/javascript" charset="utf-8"></script> | |
|
282 | <script src="static/js/textcell.js" type="text/javascript" charset="utf-8"></script> | |
|
283 | <script src="static/js/kernel.js" type="text/javascript" charset="utf-8"></script> | |
|
284 | <script src="static/js/kernelstatus.js" type="text/javascript" charset="utf-8"></script> | |
|
285 | <script src="static/js/layout.js" type="text/javascript" charset="utf-8"></script> | |
|
286 | <script src="static/js/savewidget.js" type="text/javascript" charset="utf-8"></script> | |
|
287 | <script src="static/js/quickhelp.js" type="text/javascript" charset="utf-8"></script> | |
|
288 | <script src="static/js/loginwidget.js" type="text/javascript" charset="utf-8"></script> | |
|
289 | <script src="static/js/pager.js" type="text/javascript" charset="utf-8"></script> | |
|
290 | <script src="static/js/panelsection.js" type="text/javascript" charset="utf-8"></script> | |
|
291 | <script src="static/js/printwidget.js" type="text/javascript" charset="utf-8"></script> | |
|
292 | <script src="static/js/leftpanel.js" type="text/javascript" charset="utf-8"></script> | |
|
293 | <script src="static/js/notebook.js" type="text/javascript" charset="utf-8"></script> | |
|
294 | <script src="static/js/notebookmain.js" type="text/javascript" charset="utf-8"></script> | |
|
278 | <script src="/static/js/namespace.js" type="text/javascript" charset="utf-8"></script> | |
|
279 | <script src="/static/js/utils.js" type="text/javascript" charset="utf-8"></script> | |
|
280 | <script src="/static/js/cell.js" type="text/javascript" charset="utf-8"></script> | |
|
281 | <script src="/static/js/codecell.js" type="text/javascript" charset="utf-8"></script> | |
|
282 | <script src="/static/js/textcell.js" type="text/javascript" charset="utf-8"></script> | |
|
283 | <script src="/static/js/kernel.js" type="text/javascript" charset="utf-8"></script> | |
|
284 | <script src="/static/js/kernelstatus.js" type="text/javascript" charset="utf-8"></script> | |
|
285 | <script src="/static/js/layout.js" type="text/javascript" charset="utf-8"></script> | |
|
286 | <script src="/static/js/savewidget.js" type="text/javascript" charset="utf-8"></script> | |
|
287 | <script src="/static/js/quickhelp.js" type="text/javascript" charset="utf-8"></script> | |
|
288 | <script src="/static/js/loginwidget.js" type="text/javascript" charset="utf-8"></script> | |
|
289 | <script src="/static/js/pager.js" type="text/javascript" charset="utf-8"></script> | |
|
290 | <script src="/static/js/panelsection.js" type="text/javascript" charset="utf-8"></script> | |
|
291 | <script src="/static/js/printwidget.js" type="text/javascript" charset="utf-8"></script> | |
|
292 | <script src="/static/js/leftpanel.js" type="text/javascript" charset="utf-8"></script> | |
|
293 | <script src="/static/js/notebook.js" type="text/javascript" charset="utf-8"></script> | |
|
294 | <script src="/static/js/notebookmain.js" type="text/javascript" charset="utf-8"></script> | |
|
295 | 295 | |
|
296 | 296 | </body> |
|
297 | 297 | |
|
298 | 298 | </html> |
@@ -1,43 +1,43 | |||
|
1 | 1 | {% extends layout.html %} |
|
2 | 2 | |
|
3 | 3 | {% block title %} |
|
4 | 4 | IPython Dashboard |
|
5 | 5 | {% end %} |
|
6 | 6 | |
|
7 | 7 | {% block stylesheet %} |
|
8 | <link rel="stylesheet" href="static/css/projectdashboard.css" type="text/css" /> | |
|
8 | <link rel="stylesheet" href="/static/css/projectdashboard.css" type="text/css" /> | |
|
9 | 9 | {% end %} |
|
10 | 10 | |
|
11 | 11 | {% block meta %} |
|
12 | 12 | <meta name="read_only" content="{{read_only}}"/> |
|
13 | 13 | {% end %} |
|
14 | 14 | |
|
15 | 15 | {% block params %} |
|
16 | 16 | data-project={{project}} |
|
17 | 17 | data-base-project-url={{base_project_url}} |
|
18 | 18 | data-base-kernel-url={{base_kernel_url}} |
|
19 | 19 | {% end %} |
|
20 | 20 | |
|
21 | 21 | {% block content_panel %} |
|
22 | 22 | {% if logged_in or not read_only %} |
|
23 | 23 | |
|
24 | 24 | <div id="content_toolbar"> |
|
25 | 25 | <span id="drag_info">Drag files onto the list to import |
|
26 | 26 | notebooks.</span> |
|
27 | 27 | |
|
28 | 28 | <span id="notebooks_buttons"> |
|
29 | 29 | <button id="new_notebook">New Notebook</button> |
|
30 | 30 | </span> |
|
31 | 31 | </div> |
|
32 | 32 | |
|
33 | 33 | {% end %} |
|
34 | 34 | |
|
35 | 35 | <div id="notebook_list"> |
|
36 | 36 | <div id="project_name"><h2>{{project}}</h2></div> |
|
37 | 37 | </div> |
|
38 | 38 | {% end %} |
|
39 | 39 | |
|
40 | 40 | {% block script %} |
|
41 | <script src="static/js/notebooklist.js" type="text/javascript" charset="utf-8"></script> | |
|
42 | <script src="static/js/projectdashboardmain.js" type="text/javascript" charset="utf-8"></script> | |
|
41 | <script src="/static/js/notebooklist.js" type="text/javascript" charset="utf-8"></script> | |
|
42 | <script src="/static/js/projectdashboardmain.js" type="text/javascript" charset="utf-8"></script> | |
|
43 | 43 | {% end %} |
General Comments 0
You need to be logged in to leave comments.
Login now