Skip to content

Commit

Permalink
Merge pull request ipython#4933 from jdfreder/widget-model-name
Browse files Browse the repository at this point in the history
Small Widget inconsistency fixes
  • Loading branch information
ellisonbg committed Feb 3, 2014
2 parents f692d0c + c3da831 commit ad0821d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion IPython/html/static/notebook/js/widgetmanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
// elsewhere.
define(["underscore",
"backbone",
], function (Underscore, Backbone) {
], function (_, Backbone) {

//--------------------------------------------------------------------
// WidgetManager class
Expand Down
2 changes: 1 addition & 1 deletion IPython/html/static/notebook/js/widgets/widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
define(["notebook/js/widgetmanager",
"underscore",
"backbone"],
function(WidgetManager, Underscore, Backbone){
function(WidgetManager, _, Backbone){

var WidgetModel = Backbone.Model.extend({
constructor: function (widget_manager, model_id, comm) {
Expand Down
4 changes: 2 additions & 2 deletions IPython/html/widgets/widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def _call_widget_constructed(widget):
#-------------------------------------------------------------------------
# Traits
#-------------------------------------------------------------------------
model_name = Unicode('WidgetModel', help="""Name of the backbone model
_model_name = Unicode('WidgetModel', help="""Name of the backbone model
registered in the front-end to create and sync this widget with.""")
_view_name = Unicode(help="""Default view registered in the front-end
to use to represent the widget.""", sync=True)
Expand Down Expand Up @@ -121,7 +121,7 @@ def comm(self):
If a Comm doesn't exist yet, a Comm will be created automagically."""
if self._comm is None:
# Create a comm.
self._comm = Comm(target_name=self.model_name)
self._comm = Comm(target_name=self._model_name)
self._comm.on_msg(self._handle_msg)
self._comm.on_close(self._close)
Widget.widgets[self.model_id] = self
Expand Down

0 comments on commit ad0821d

Please sign in to comment.