Make changes suggested by @jdfreder

Thomas Kluyver 12 years ago
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…
Cancel
Save