From 57f3057ca5c73cf5a94b8284830f8dbf7c676c9a Mon Sep 17 00:00:00 2001 From: Jonathan Frederic Date: Thu, 2 Jan 2014 15:36:24 -0800 Subject: [PATCH] Moved view widget into widget.py --- IPython/html/widgets/widget.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/IPython/html/widgets/widget.py b/IPython/html/widgets/widget.py index d5ed371ca..eb7f50b74 100644 --- a/IPython/html/widgets/widget.py +++ b/IPython/html/widgets/widget.py @@ -27,8 +27,6 @@ from IPython.utils.traitlets import Unicode, Dict, List, Instance, Bool from IPython.display import Javascript, display from IPython.utils.py3compat import string_types -from .widget_view import ViewWidget - #----------------------------------------------------------------------------- # Classes #----------------------------------------------------------------------------- @@ -331,7 +329,16 @@ class BaseWidget(LoggingConfigurable): self._comm.send(msg) return True else: - return False + return False + + +class ViewWidget(BaseWidget): + target_name = Unicode('ViewModel') + + def __init__(self, widget, view): + self.default_view_name = view + self.widget = widget + class Widget(BaseWidget): visible = Bool(True, help="Whether or not the widget is visible.")