Make changes suggested by @jdfreder

This commit is contained in:
Thomas Kluyver 2014-09-18 11:57:37 -07:00
parent 5953a3f874
commit 09b10dcb86
2 changed files with 2 additions and 3 deletions

View File

@ -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])
});

View File

@ -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)