mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-27 04:20:22 +08:00
Make changes suggested by @jdfreder
This commit is contained in:
parent
5953a3f874
commit
09b10dcb86
@ -115,8 +115,7 @@ define([
|
||||
|
||||
var view_name = model.get('_view_name');
|
||||
var view_mod = model.get('_view_module');
|
||||
if (view_mod !== '') {
|
||||
console.log(view_mod);
|
||||
if (!view_mod) {
|
||||
require([view_mod], function(module) {
|
||||
instantiate_view(module[view_name])
|
||||
});
|
||||
|
@ -100,7 +100,7 @@ class Widget(LoggingConfigurable):
|
||||
#-------------------------------------------------------------------------
|
||||
_model_name = Unicode('WidgetModel', help="""Name of the backbone model
|
||||
registered in the front-end to create and sync this widget with.""")
|
||||
_view_module = Unicode('', help="""A requirejs module in which to find _view_name.
|
||||
_view_module = Unicode(help="""A requirejs module in which to find _view_name.
|
||||
If empty, look in the global registry.""", sync=True)
|
||||
_view_name = Unicode(None, allow_none=True, help="""Default view registered in the front-end
|
||||
to use to represent the widget.""", sync=True)
|
||||
|
Loading…
Reference in New Issue
Block a user