Show More
@@ -193,6 +193,7 b' class IPythonHandler(AuthenticatedHandler):' | |||
|
193 | 193 | logged_in=self.logged_in, |
|
194 | 194 | login_available=self.login_available, |
|
195 | 195 | use_less=self.use_less, |
|
196 | static_url=self.static_url, | |
|
196 | 197 | ) |
|
197 | 198 | |
|
198 | 199 | def get_json_body(self): |
@@ -329,13 +330,16 b' class FileFindHandler(web.StaticFileHandler):' | |||
|
329 | 330 | abspath = os.path.abspath(filefind(path, roots)) |
|
330 | 331 | except IOError: |
|
331 | 332 | # IOError means not found |
|
332 | raise web.HTTPError(404) | |
|
333 | return '' | |
|
333 | 334 | |
|
334 | 335 | cls._static_paths[path] = abspath |
|
335 | 336 | return abspath |
|
336 | 337 | |
|
337 | 338 | def validate_absolute_path(self, root, absolute_path): |
|
338 | 339 | """check if the file should be served (raises 404, 403, etc.)""" |
|
340 | if absolute_path == '': | |
|
341 | raise web.HTTPError(404) | |
|
342 | ||
|
339 | 343 | for root in self.root: |
|
340 | 344 | if (absolute_path + os.sep).startswith(root): |
|
341 | 345 | break |
@@ -1,9 +1,6 b'' | |||
|
1 | 1 | |
|
2 | 2 | |
|
3 | 3 | <!DOCTYPE HTML> |
|
4 | {% macro static_url(name) -%} | |
|
5 | {{ base_project_url }}static/{{ name }} | |
|
6 | {%- endmacro %} | |
|
7 | 4 | <html> |
|
8 | 5 | |
|
9 | 6 | <head> |
@@ -28,7 +25,7 b'' | |||
|
28 | 25 | <script src="{{static_url("components/requirejs/require.js") }}" type="text/javascript" charset="utf-8"></script> |
|
29 | 26 | <script> |
|
30 | 27 | require.config({ |
|
31 | baseUrl: '{{static_url()}}', | |
|
28 | baseUrl: '{{static_url("")}}', | |
|
32 | 29 | paths: { |
|
33 | 30 | nbextensions : '{{ base_project_url }}nbextensions' |
|
34 | 31 | } |
General Comments 0
You need to be logged in to leave comments.
Login now