Show More
@@ -168,12 +168,15 b' class AuthenticatedHandler(RequestHandler):' | |||||
168 | @property |
|
168 | @property | |
169 | def ws_url(self): |
|
169 | def ws_url(self): | |
170 | """websocket url matching the current request |
|
170 | """websocket url matching the current request | |
171 |
|
171 | |||
172 | turns http[s]://host[:port] into |
|
172 | turns http[s]://host[:port] into | |
173 | ws[s]://host[:port] |
|
173 | ws[s]://host[:port] | |
174 | """ |
|
174 | """ | |
175 | proto = self.request.protocol.replace('http', 'ws') |
|
175 | proto = self.request.protocol.replace('http', 'ws') | |
176 | return "%s://%s" % (proto, self.request.host) |
|
176 | host = self.application.ipython_app.websocket_host # default to config value | |
|
177 | if host == '': | |||
|
178 | host = self.request.host # get from request | |||
|
179 | return "%s://%s" % (proto, host) | |||
177 |
|
180 | |||
178 |
|
181 | |||
179 | class AuthenticatedFileHandler(AuthenticatedHandler, web.StaticFileHandler): |
|
182 | class AuthenticatedFileHandler(AuthenticatedHandler, web.StaticFileHandler): | |
@@ -192,7 +195,8 b' class ProjectDashboardHandler(AuthenticatedHandler):' | |||||
192 | project = nbm.notebook_dir |
|
195 | project = nbm.notebook_dir | |
193 | self.render( |
|
196 | self.render( | |
194 | 'projectdashboard.html', project=project, |
|
197 | 'projectdashboard.html', project=project, | |
195 |
base_project_url= |
|
198 | base_project_url=self.application.ipython_app.base_project_url, | |
|
199 | base_kernel_url=self.application.ipython_app.base_kernel_url, | |||
196 | read_only=self.read_only, |
|
200 | read_only=self.read_only, | |
197 | logged_in=self.logged_in, |
|
201 | logged_in=self.logged_in, | |
198 | login_available=self.login_available |
|
202 | login_available=self.login_available | |
@@ -255,7 +259,8 b' class NewHandler(AuthenticatedHandler):' | |||||
255 | self.render( |
|
259 | self.render( | |
256 | 'notebook.html', project=project, |
|
260 | 'notebook.html', project=project, | |
257 | notebook_id=notebook_id, |
|
261 | notebook_id=notebook_id, | |
258 |
base_project_url= |
|
262 | base_project_url=self.application.ipython_app.base_project_url, | |
|
263 | base_kernel_url=self.application.ipython_app.base_kernel_url, | |||
259 | kill_kernel=False, |
|
264 | kill_kernel=False, | |
260 | read_only=False, |
|
265 | read_only=False, | |
261 | logged_in=self.logged_in, |
|
266 | logged_in=self.logged_in, | |
@@ -276,7 +281,8 b' class NamedNotebookHandler(AuthenticatedHandler):' | |||||
276 | self.render( |
|
281 | self.render( | |
277 | 'notebook.html', project=project, |
|
282 | 'notebook.html', project=project, | |
278 | notebook_id=notebook_id, |
|
283 | notebook_id=notebook_id, | |
279 |
base_project_url= |
|
284 | base_project_url=self.application.ipython_app.base_project_url, | |
|
285 | base_kernel_url=self.application.ipython_app.base_kernel_url, | |||
280 | kill_kernel=False, |
|
286 | kill_kernel=False, | |
281 | read_only=self.read_only, |
|
287 | read_only=self.read_only, | |
282 | logged_in=self.logged_in, |
|
288 | logged_in=self.logged_in, | |
@@ -297,7 +303,8 b' class PrintNotebookHandler(AuthenticatedHandler):' | |||||
297 | self.render( |
|
303 | self.render( | |
298 | 'printnotebook.html', project=project, |
|
304 | 'printnotebook.html', project=project, | |
299 | notebook_id=notebook_id, |
|
305 | notebook_id=notebook_id, | |
300 |
base_project_url= |
|
306 | base_project_url=self.application.ipython_app.base_project_url, | |
|
307 | base_kernel_url=self.application.ipython_app.base_kernel_url, | |||
301 | kill_kernel=False, |
|
308 | kill_kernel=False, | |
302 | read_only=self.read_only, |
|
309 | read_only=self.read_only, | |
303 | logged_in=self.logged_in, |
|
310 | logged_in=self.logged_in, | |
@@ -637,7 +644,8 b' class NotebookCopyHandler(AuthenticatedHandler):' | |||||
637 | self.render( |
|
644 | self.render( | |
638 | 'notebook.html', project=project, |
|
645 | 'notebook.html', project=project, | |
639 | notebook_id=notebook_id, |
|
646 | notebook_id=notebook_id, | |
640 |
base_project_url= |
|
647 | base_project_url=self.application.ipython_app.base_project_url, | |
|
648 | base_kernel_url=self.application.ipython_app.base_kernel_url, | |||
641 | kill_kernel=False, |
|
649 | kill_kernel=False, | |
642 | read_only=False, |
|
650 | read_only=False, | |
643 | logged_in=self.logged_in, |
|
651 | logged_in=self.logged_in, |
@@ -85,12 +85,23 b' ipython notebook --port=5555 --ip=* # Listen on port 5555, all interfaces' | |||||
85 | """ |
|
85 | """ | |
86 |
|
86 | |||
87 | #----------------------------------------------------------------------------- |
|
87 | #----------------------------------------------------------------------------- | |
|
88 | # Helper functions | |||
|
89 | #----------------------------------------------------------------------------- | |||
|
90 | ||||
|
91 | def url_path_join(a,b): | |||
|
92 | if a.endswith('/') and b.startswith('/'): | |||
|
93 | return a[:-1]+b | |||
|
94 | else: | |||
|
95 | return a+b | |||
|
96 | ||||
|
97 | #----------------------------------------------------------------------------- | |||
88 | # The Tornado web application |
|
98 | # The Tornado web application | |
89 | #----------------------------------------------------------------------------- |
|
99 | #----------------------------------------------------------------------------- | |
90 |
|
100 | |||
91 | class NotebookWebApplication(web.Application): |
|
101 | class NotebookWebApplication(web.Application): | |
92 |
|
102 | |||
93 |
def __init__(self, ipython_app, kernel_manager, notebook_manager, log, |
|
103 | def __init__(self, ipython_app, kernel_manager, notebook_manager, log, | |
|
104 | base_project_url, settings_overrides): | |||
94 | handlers = [ |
|
105 | handlers = [ | |
95 | (r"/", ProjectDashboardHandler), |
|
106 | (r"/", ProjectDashboardHandler), | |
96 | (r"/login", LoginHandler), |
|
107 | (r"/login", LoginHandler), | |
@@ -119,7 +130,14 b' class NotebookWebApplication(web.Application):' | |||||
119 | # allow custom overrides for the tornado web app. |
|
130 | # allow custom overrides for the tornado web app. | |
120 | settings.update(settings_overrides) |
|
131 | settings.update(settings_overrides) | |
121 |
|
132 | |||
122 | super(NotebookWebApplication, self).__init__(handlers, **settings) |
|
133 | # prepend base_project_url onto the patterns that we match | |
|
134 | new_handlers = [] | |||
|
135 | for handler in handlers: | |||
|
136 | pattern = url_path_join(base_project_url, handler[0]) | |||
|
137 | new_handler = tuple([pattern]+list(handler[1:])) | |||
|
138 | new_handlers.append( new_handler ) | |||
|
139 | ||||
|
140 | super(NotebookWebApplication, self).__init__(new_handlers, **settings) | |||
123 |
|
141 | |||
124 | self.kernel_manager = kernel_manager |
|
142 | self.kernel_manager = kernel_manager | |
125 | self.log = log |
|
143 | self.log = log | |
@@ -277,7 +295,15 b' class NotebookApp(BaseIPythonApplication):' | |||||
277 | """set mathjax url to empty if mathjax is disabled""" |
|
295 | """set mathjax url to empty if mathjax is disabled""" | |
278 | if not new: |
|
296 | if not new: | |
279 | self.mathjax_url = u'' |
|
297 | self.mathjax_url = u'' | |
280 |
|
298 | |||
|
299 | base_project_url = Unicode('/', config=True, | |||
|
300 | help='''The base URL for the notebook server''') | |||
|
301 | base_kernel_url = Unicode('/', config=True, | |||
|
302 | help='''The base URL for the kernel server''') | |||
|
303 | websocket_host = Unicode("", config=True, | |||
|
304 | help="""The hostname for the websocket server.""" | |||
|
305 | ) | |||
|
306 | ||||
281 | mathjax_url = Unicode("", config=True, |
|
307 | mathjax_url = Unicode("", config=True, | |
282 | help="""The url for MathJax.js.""" |
|
308 | help="""The url for MathJax.js.""" | |
283 | ) |
|
309 | ) | |
@@ -285,9 +311,11 b' class NotebookApp(BaseIPythonApplication):' | |||||
285 | if not self.enable_mathjax: |
|
311 | if not self.enable_mathjax: | |
286 | return u'' |
|
312 | return u'' | |
287 | static_path = self.webapp_settings.get("static_path", os.path.join(os.path.dirname(__file__), "static")) |
|
313 | static_path = self.webapp_settings.get("static_path", os.path.join(os.path.dirname(__file__), "static")) | |
|
314 | static_url_prefix = self.webapp_settings.get("static_url_prefix", | |||
|
315 | "/static/") | |||
288 | if os.path.exists(os.path.join(static_path, 'mathjax', "MathJax.js")): |
|
316 | if os.path.exists(os.path.join(static_path, 'mathjax', "MathJax.js")): | |
289 | self.log.info("Using local MathJax") |
|
317 | self.log.info("Using local MathJax") | |
290 |
return u" |
|
318 | return static_url_prefix+u"mathjax/MathJax.js" | |
291 | else: |
|
319 | else: | |
292 | self.log.info("Using MathJax from CDN") |
|
320 | self.log.info("Using MathJax from CDN") | |
293 | return u"http://cdn.mathjax.org/mathjax/latest/MathJax.js" |
|
321 | return u"http://cdn.mathjax.org/mathjax/latest/MathJax.js" | |
@@ -331,7 +359,7 b' class NotebookApp(BaseIPythonApplication):' | |||||
331 | """initialize tornado webapp and httpserver""" |
|
359 | """initialize tornado webapp and httpserver""" | |
332 | self.web_app = NotebookWebApplication( |
|
360 | self.web_app = NotebookWebApplication( | |
333 | self, self.kernel_manager, self.notebook_manager, self.log, |
|
361 | self, self.kernel_manager, self.notebook_manager, self.log, | |
334 | self.webapp_settings |
|
362 | self.base_project_url, self.webapp_settings | |
335 | ) |
|
363 | ) | |
336 | if self.certfile: |
|
364 | if self.certfile: | |
337 | ssl_options = dict(certfile=self.certfile) |
|
365 | ssl_options = dict(certfile=self.certfile) |
@@ -124,7 +124,7 b' var IPython = (function (IPython) {' | |||||
124 | SaveWidget.prototype.update_url = function () { |
|
124 | SaveWidget.prototype.update_url = function () { | |
125 | var notebook_id = this.get_notebook_id(); |
|
125 | var notebook_id = this.get_notebook_id(); | |
126 | if (notebook_id !== '') { |
|
126 | if (notebook_id !== '') { | |
127 |
var new_url = |
|
127 | var new_url = $('body').data('baseProjectUrl') + notebook_id; | |
128 | window.history.replaceState({}, '', new_url); |
|
128 | window.history.replaceState({}, '', new_url); | |
129 | }; |
|
129 | }; | |
130 | }; |
|
130 | }; |
@@ -6,10 +6,10 b'' | |||||
6 |
|
6 | |||
7 | <title>{% block title %}IPython Notebook{% end %}</title> |
|
7 | <title>{% block title %}IPython Notebook{% end %}</title> | |
8 |
|
8 | |||
9 |
<link rel="stylesheet" href=" |
|
9 | <link rel="stylesheet" href="{{static_url("jquery/css/themes/base/jquery-ui.min.css") }}" type="text/css" /> | |
10 |
<link rel="stylesheet" href=" |
|
10 | <link rel="stylesheet" href="{{static_url("css/boilerplate.css") }}" type="text/css" /> | |
11 |
<link rel="stylesheet" href=" |
|
11 | <link rel="stylesheet" href="{{static_url("css/layout.css") }}" type="text/css" /> | |
12 |
<link rel="stylesheet" href=" |
|
12 | <link rel="stylesheet" href="{{static_url("css/base.css") }}" type="text/css"/> | |
13 | {% block stylesheet %} |
|
13 | {% block stylesheet %} | |
14 | {% end %} |
|
14 | {% end %} | |
15 |
|
15 | |||
@@ -21,7 +21,7 b'' | |||||
21 | <body {% block params %}{% end %}> |
|
21 | <body {% block params %}{% end %}> | |
22 |
|
22 | |||
23 | <div id="header"> |
|
23 | <div id="header"> | |
24 |
<span id="ipython_notebook"><h1><img src=' |
|
24 | <span id="ipython_notebook"><h1><img src='{{static_url("ipynblogo.png") }}' alt='IPython Notebook'/></h1></span> | |
25 |
|
25 | |||
26 | {% block login_widget %} |
|
26 | {% block login_widget %} | |
27 |
|
27 | |||
@@ -72,11 +72,11 b'' | |||||
72 |
|
72 | |||
73 | </div> |
|
73 | </div> | |
74 |
|
74 | |||
75 |
<script src=" |
|
75 | <script src="{{static_url("jquery/js/jquery-1.7.1.min.js") }}" type="text/javascript" charset="utf-8"></script> | |
76 |
<script src=" |
|
76 | <script src="{{static_url("jquery/js/jquery-ui.min.js") }}" type="text/javascript" charset="utf-8"></script> | |
77 |
<script src=" |
|
77 | <script src="{{static_url("js/namespace.js") }}" type="text/javascript" charset="utf-8"></script> | |
78 |
<script src=" |
|
78 | <script src="{{static_url("js/loginmain.js") }}" type="text/javascript" charset="utf-8"></script> | |
79 |
<script src=" |
|
79 | <script src="{{static_url("js/loginwidget.js") }}" type="text/javascript" charset="utf-8"></script> | |
80 |
|
80 | |||
81 | {% block script %} |
|
81 | {% block script %} | |
82 | {% end %} |
|
82 | {% end %} |
@@ -15,17 +15,17 b'' | |||||
15 | window.mathjax_url = "{{mathjax_url}}"; |
|
15 | window.mathjax_url = "{{mathjax_url}}"; | |
16 | </script> |
|
16 | </script> | |
17 |
|
17 | |||
18 |
<link rel="stylesheet" href=" |
|
18 | <link rel="stylesheet" href="{{ static_url("jquery/css/themes/base/jquery-ui.min.css") }}" type="text/css" /> | |
19 |
<link rel="stylesheet" href=" |
|
19 | <link rel="stylesheet" href="{{ static_url("codemirror/lib/codemirror.css") }}"> | |
20 |
<link rel="stylesheet" href=" |
|
20 | <link rel="stylesheet" href="{{ static_url("codemirror/theme/ipython.css") }}"> | |
21 |
|
21 | |||
22 |
<link rel="stylesheet" href=" |
|
22 | <link rel="stylesheet" href="{{ static_url("prettify/prettify.css") }}"/> | |
23 |
|
23 | |||
24 |
<link rel="stylesheet" href=" |
|
24 | <link rel="stylesheet" href="{{ static_url("css/boilerplate.css") }}" type="text/css" /> | |
25 |
<link rel="stylesheet" href=" |
|
25 | <link rel="stylesheet" href="{{ static_url("css/layout.css") }}" type="text/css" /> | |
26 |
<link rel="stylesheet" href=" |
|
26 | <link rel="stylesheet" href="{{ static_url("css/base.css") }}" type="text/css" /> | |
27 |
<link rel="stylesheet" href=" |
|
27 | <link rel="stylesheet" href="{{ static_url("css/notebook.css") }}" type="text/css" /> | |
28 |
<link rel="stylesheet" href=" |
|
28 | <link rel="stylesheet" href="{{ static_url("css/renderedhtml.css") }}" type="text/css" /> | |
29 |
|
29 | |||
30 | {% comment In the notebook, the read-only flag is used to determine %} |
|
30 | {% comment In the notebook, the read-only flag is used to determine %} | |
31 | {% comment whether to hide the side panels and switch off input %} |
|
31 | {% comment whether to hide the side panels and switch off input %} | |
@@ -39,7 +39,7 b'' | |||||
39 | > |
|
39 | > | |
40 |
|
40 | |||
41 | <div id="header"> |
|
41 | <div id="header"> | |
42 |
<span id="ipython_notebook"><h1><a href='..' alt='dashboard'><img src=' |
|
42 | <span id="ipython_notebook"><h1><a href='..' alt='dashboard'><img src='{{static_url("ipynblogo.png")}}' alt='IPython Notebook'/></a></h1></span> | |
43 | <span id="save_widget"> |
|
43 | <span id="save_widget"> | |
44 | <span id="notebook_name"></span> |
|
44 | <span id="notebook_name"></span> | |
45 | <span id="save_status"></span> |
|
45 | <span id="save_status"></span> | |
@@ -188,39 +188,39 b'' | |||||
188 |
|
188 | |||
189 | </div> |
|
189 | </div> | |
190 |
|
190 | |||
191 |
<script src=" |
|
191 | <script src="{{ static_url("jquery/js/jquery-1.7.1.min.js") }}" type="text/javascript" charset="utf-8"></script> | |
192 |
<script src=" |
|
192 | <script src="{{ static_url("jquery/js/jquery-ui.min.js") }}" type="text/javascript" charset="utf-8"></script> | |
193 |
|
193 | |||
194 |
<script src=" |
|
194 | <script src="{{ static_url("codemirror/lib/codemirror.js") }}" charset="utf-8"></script> | |
195 |
<script src=" |
|
195 | <script src="{{ static_url("codemirror/mode/python/python.js") }}" charset="utf-8"></script> | |
196 |
<script src=" |
|
196 | <script src="{{ static_url("codemirror/mode/htmlmixed/htmlmixed.js") }}" charset="utf-8"></script> | |
197 |
<script src=" |
|
197 | <script src="{{ static_url("codemirror/mode/xml/xml.js") }}" charset="utf-8"></script> | |
198 |
<script src=" |
|
198 | <script src="{{ static_url("codemirror/mode/javascript/javascript.js") }}" charset="utf-8"></script> | |
199 |
<script src=" |
|
199 | <script src="{{ static_url("codemirror/mode/css/css.js") }}" charset="utf-8"></script> | |
200 |
<script src=" |
|
200 | <script src="{{ static_url("codemirror/mode/rst/rst.js") }}" charset="utf-8"></script> | |
201 |
<script src=" |
|
201 | <script src="{{ static_url("codemirror/mode/markdown/markdown.js") }}" charset="utf-8"></script> | |
202 |
|
202 | |||
203 |
<script src=" |
|
203 | <script src="{{ static_url("pagedown/Markdown.Converter.js") }}" charset="utf-8"></script> | |
204 |
|
204 | |||
205 |
<script src=" |
|
205 | <script src="{{ static_url("prettify/prettify.js") }}" charset="utf-8"></script> | |
206 |
<script src=" |
|
206 | <script src="{{ static_url("dateformat/date.format.js") }}" charset="utf-8"></script> | |
207 |
|
207 | |||
208 |
<script src=" |
|
208 | <script src="{{ static_url("js/namespace.js") }}" type="text/javascript" charset="utf-8"></script> | |
209 |
<script src=" |
|
209 | <script src="{{ static_url("js/utils.js") }}" type="text/javascript" charset="utf-8"></script> | |
210 |
<script src=" |
|
210 | <script src="{{ static_url("js/cell.js") }}" type="text/javascript" charset="utf-8"></script> | |
211 |
<script src=" |
|
211 | <script src="{{ static_url("js/codecell.js") }}" type="text/javascript" charset="utf-8"></script> | |
212 |
<script src=" |
|
212 | <script src="{{ static_url("js/textcell.js") }}" type="text/javascript" charset="utf-8"></script> | |
213 |
<script src=" |
|
213 | <script src="{{ static_url("js/kernel.js") }}" type="text/javascript" charset="utf-8"></script> | |
214 |
<script src=" |
|
214 | <script src="{{ static_url("js/kernelstatus.js") }}" type="text/javascript" charset="utf-8"></script> | |
215 |
<script src=" |
|
215 | <script src="{{ static_url("js/layout.js") }}" type="text/javascript" charset="utf-8"></script> | |
216 |
<script src=" |
|
216 | <script src="{{ static_url("js/savewidget.js") }}" type="text/javascript" charset="utf-8"></script> | |
217 |
<script src=" |
|
217 | <script src="{{ static_url("js/quickhelp.js") }}" type="text/javascript" charset="utf-8"></script> | |
218 |
<script src=" |
|
218 | <script src="{{ static_url("js/loginwidget.js") }}" type="text/javascript" charset="utf-8"></script> | |
219 |
<script src=" |
|
219 | <script src="{{ static_url("js/pager.js") }}" type="text/javascript" charset="utf-8"></script> | |
220 |
<script src=" |
|
220 | <script src="{{ static_url("js/menubar.js") }}" type="text/javascript" charset="utf-8"></script> | |
221 |
<script src=" |
|
221 | <script src="{{ static_url("js/toolbar.js") }}" type="text/javascript" charset="utf-8"></script> | |
222 |
<script src=" |
|
222 | <script src="{{ static_url("js/notebook.js") }}" type="text/javascript" charset="utf-8"></script> | |
223 |
<script src=" |
|
223 | <script src="{{ static_url("js/notebookmain.js") }}" type="text/javascript" charset="utf-8"></script> | |
224 |
|
224 | |||
225 | </body> |
|
225 | </body> | |
226 |
|
226 |
@@ -15,21 +15,21 b'' | |||||
15 | window.mathjax_url = "{{mathjax_url}}"; |
|
15 | window.mathjax_url = "{{mathjax_url}}"; | |
16 | </script> |
|
16 | </script> | |
17 |
|
17 | |||
18 |
<link rel="stylesheet" href=" |
|
18 | <link rel="stylesheet" href="{{ static_url("jquery/css/themes/base/jquery-ui.min.css") }}" type="text/css" /> | |
19 |
<link rel="stylesheet" href=" |
|
19 | <link rel="stylesheet" href="{{ static_url("codemirror/lib/codemirror.css") }}"> | |
20 |
<link rel="stylesheet" href=" |
|
20 | <link rel="stylesheet" href="{{ static_url("codemirror/mode/markdown/markdown.css") }}"> | |
21 |
<link rel="stylesheet" href=" |
|
21 | <link rel="stylesheet" href="{{ static_url("codemirror/mode/rst/rst.css") }}"> | |
22 |
<link rel="stylesheet" href=" |
|
22 | <link rel="stylesheet" href="{{ static_url("codemirror/theme/ipython.css") }}"> | |
23 |
<link rel="stylesheet" href=" |
|
23 | <link rel="stylesheet" href="{{ static_url("codemirror/theme/default.css") }}"> | |
24 |
|
24 | |||
25 |
<link rel="stylesheet" href=" |
|
25 | <link rel="stylesheet" href="{{ static_url("prettify/prettify.css") }}"/> | |
26 |
|
26 | |||
27 |
<link rel="stylesheet" href=" |
|
27 | <link rel="stylesheet" href="{{ static_url("css/boilerplate.css") }}" type="text/css" /> | |
28 |
<link rel="stylesheet" href=" |
|
28 | <link rel="stylesheet" href="{{ static_url("css/layout.css") }}" type="text/css" /> | |
29 |
<link rel="stylesheet" href=" |
|
29 | <link rel="stylesheet" href="{{ static_url("css/base.css") }}" type="text/css" /> | |
30 |
<link rel="stylesheet" href=" |
|
30 | <link rel="stylesheet" href="{{ static_url("css/notebook.css") }}" type="text/css" /> | |
31 |
<link rel="stylesheet" href=" |
|
31 | <link rel="stylesheet" href="{{ static_url("css/printnotebook.css") }}" type="text/css" /> | |
32 |
<link rel="stylesheet" href=" |
|
32 | <link rel="stylesheet" href="{{ static_url("css/renderedhtml.css") }}" type="text/css" /> | |
33 |
|
33 | |||
34 | {% comment In the notebook, the read-only flag is used to determine %} |
|
34 | {% comment In the notebook, the read-only flag is used to determine %} | |
35 | {% comment whether to hide the side panels and switch off input %} |
|
35 | {% comment whether to hide the side panels and switch off input %} | |
@@ -43,7 +43,7 b'' | |||||
43 | > |
|
43 | > | |
44 |
|
44 | |||
45 | <div id="header"> |
|
45 | <div id="header"> | |
46 |
<span id="ipython_notebook"><h1><a href='..' alt='dashboard'><img src=' |
|
46 | <span id="ipython_notebook"><h1><a href='..' alt='dashboard'><img src='{{static_url("ipynblogo.png") }}' alt='IPython Notebook'/></a></h1></span> | |
47 | <span id="save_widget"> |
|
47 | <span id="save_widget"> | |
48 | <span id="notebook_name"></span> |
|
48 | <span id="notebook_name"></span> | |
49 | <span id="save_status"></span> |
|
49 | <span id="save_status"></span> | |
@@ -70,34 +70,34 b'' | |||||
70 |
|
70 | |||
71 | </div> |
|
71 | </div> | |
72 |
|
72 | |||
73 |
<script src=" |
|
73 | <script src="{{ static_url("jquery/js/jquery-1.7.1.min.js") }}" type="text/javascript" charset="utf-8"></script> | |
74 |
<script src=" |
|
74 | <script src="{{ static_url("jquery/js/jquery-ui.min.js") }}" type="text/javascript" charset="utf-8"></script> | |
75 |
|
75 | |||
76 |
<script src=" |
|
76 | <script src="{{ static_url("codemirror/lib/codemirror.js") }}" charset="utf-8"></script> | |
77 |
<script src=" |
|
77 | <script src="{{ static_url("codemirror/mode/python/python.js") }}" charset="utf-8"></script> | |
78 |
<script src=" |
|
78 | <script src="{{ static_url("codemirror/mode/htmlmixed/htmlmixed.js") }}" charset="utf-8"></script> | |
79 |
<script src=" |
|
79 | <script src="{{ static_url("codemirror/mode/xml/xml.js") }}" charset="utf-8"></script> | |
80 |
<script src=" |
|
80 | <script src="{{ static_url("codemirror/mode/javascript/javascript.js") }}" charset="utf-8"></script> | |
81 |
<script src=" |
|
81 | <script src="{{ static_url("codemirror/mode/css/css.js") }}" charset="utf-8"></script> | |
82 |
<script src=" |
|
82 | <script src="{{ static_url("codemirror/mode/rst/rst.js") }}" charset="utf-8"></script> | |
83 |
<script src=" |
|
83 | <script src="{{ static_url("codemirror/mode/markdown/markdown.js") }}" charset="utf-8"></script> | |
84 |
|
84 | |||
85 |
<script src=" |
|
85 | <script src="{{ static_url("pagedown/Markdown.Converter.js") }}" charset="utf-8"></script> | |
86 |
|
86 | |||
87 |
<script src=" |
|
87 | <script src="{{ static_url("prettify/prettify.js") }}" charset="utf-8"></script> | |
88 |
<script src=" |
|
88 | <script src="{{ static_url("dateformat/date.format.js") }}" charset="utf-8"></script> | |
89 |
|
89 | |||
90 |
<script src=" |
|
90 | <script src="{{ static_url("js/namespace.js") }}" type="text/javascript" charset="utf-8"></script> | |
91 |
<script src=" |
|
91 | <script src="{{ static_url("js/utils.js") }}" type="text/javascript" charset="utf-8"></script> | |
92 |
<script src=" |
|
92 | <script src="{{ static_url("js/cell.js") }}" type="text/javascript" charset="utf-8"></script> | |
93 |
<script src=" |
|
93 | <script src="{{ static_url("js/codecell.js") }}" type="text/javascript" charset="utf-8"></script> | |
94 |
<script src=" |
|
94 | <script src="{{ static_url("js/textcell.js") }}" type="text/javascript" charset="utf-8"></script> | |
95 |
<script src=" |
|
95 | <script src="{{ static_url("js/kernel.js") }}" type="text/javascript" charset="utf-8"></script> | |
96 |
<script src=" |
|
96 | <script src="{{ static_url("js/kernelstatus.js") }}" type="text/javascript" charset="utf-8"></script> | |
97 |
<script src=" |
|
97 | <script src="{{ static_url("js/savewidget.js") }}" type="text/javascript" charset="utf-8"></script> | |
98 |
<script src=" |
|
98 | <script src="{{ static_url("js/loginwidget.js") }}" type="text/javascript" charset="utf-8"></script> | |
99 |
<script src=" |
|
99 | <script src="{{ static_url("js/notebook.js") }}" type="text/javascript" charset="utf-8"></script> | |
100 |
<script src=" |
|
100 | <script src="{{ static_url("js/printnotebookmain.js") }}" type="text/javascript" charset="utf-8"></script> | |
101 |
|
101 | |||
102 | </body> |
|
102 | </body> | |
103 |
|
103 |
@@ -5,7 +5,7 b' IPython Dashboard' | |||||
5 | {% end %} |
|
5 | {% end %} | |
6 |
|
6 | |||
7 | {% block stylesheet %} |
|
7 | {% block stylesheet %} | |
8 |
<link rel="stylesheet" href=" |
|
8 | <link rel="stylesheet" href="{{static_url("css/projectdashboard.css") }}" type="text/css" /> | |
9 | {% end %} |
|
9 | {% end %} | |
10 |
|
10 | |||
11 | {% block meta %} |
|
11 | {% block meta %} | |
@@ -38,6 +38,6 b' data-base-kernel-url={{base_kernel_url}}' | |||||
38 | {% end %} |
|
38 | {% end %} | |
39 |
|
39 | |||
40 | {% block script %} |
|
40 | {% block script %} | |
41 |
<script src=" |
|
41 | <script src="{{static_url("js/notebooklist.js") }}" type="text/javascript" charset="utf-8"></script> | |
42 |
<script src=" |
|
42 | <script src="{{static_url("js/projectdashboardmain.js") }}" type="text/javascript" charset="utf-8"></script> | |
43 | {% end %} |
|
43 | {% end %} |
@@ -355,7 +355,22 b' uncomment and edit is here::' | |||||
355 | c.NotebookApp.port = 9999 |
|
355 | c.NotebookApp.port = 9999 | |
356 |
|
356 | |||
357 | You can then start the notebook and access it later by pointing your browser to |
|
357 | You can then start the notebook and access it later by pointing your browser to | |
358 | ``https://your.host.com:9999``. |
|
358 | ``https://your.host.com:9999`` with ``ipython notebook --profile=nbserver``. | |
|
359 | ||||
|
360 | Running with a different URL prefix | |||
|
361 | =================================== | |||
|
362 | ||||
|
363 | The notebook dashboard (i.e. the default landing page with an overview | |||
|
364 | of all your notebooks) typically lives at a URL path of | |||
|
365 | "http://localhost:8888/". If you want to have it, and the rest of the | |||
|
366 | notebook, live under a sub-directory, | |||
|
367 | e.g. "http://localhost:8888/ipython/", you can do so with command-line | |||
|
368 | options like these: | |||
|
369 | ||||
|
370 | $ ipython notebook --NotebookApp.webapp_settings="\ | |||
|
371 | {'base_project_url':'/ipython/', \ | |||
|
372 | 'base_kernel_url':'/ipython/', \ | |||
|
373 | 'static_url_prefix':'/ipython/static/'}" | |||
359 |
|
374 | |||
360 | .. _notebook_format: |
|
375 | .. _notebook_format: | |
361 |
|
376 |
General Comments 0
You need to be logged in to leave comments.
Login now