1. Ralph Bean
  2. tw2.jit

Commits

Ralph Bean  committed d6b5073

Revert "Miscellaneous."

This reverts commit c35d3f126521f860bab907713251748f4ed13b5f.

  • Participants
  • Parent commits 1803a8e
  • Branches default

Comments (0)

Files changed (5)

File setup.py

View file
 from setuptools import setup, find_packages
 
-import multiprocessing, logging
-
 f = open('README.rst')
 long_description = f.read().strip()
 long_description = long_description.split('split here', 1)[1]
         "tw2.dynforms",
         "BeautifulSoup",
         ],
-    test_suite='nose.collector',
-    tests_require = [
-        'nose',
-        'formencode',
-        'strainer',
-        'webtest',
-    ],
     packages=find_packages(exclude=['ez_setup']),
     namespace_packages = ['tw2'],
     zip_safe=False,

File tests/test_widgets.py

View file
             { 'label': 'date B', 'values': [30, 10, 45, 10] }
         ]
     }
-    expected = """<div style="text-align:center; overflow:hidden; background-color:#3a3a3a; width: 750; height: 750;" id="foo"></div>"""
-
-class test_JS(object):
-    def test_js_call(self):
-        import tw2.jit.samples
-        w = tw2.jit.samples.DemoAreaChart(id='foo')
-        w.display()
+    expected = """<div style="text-align:center; overflow:hidden; background-color:#3a3a3a; width: 500; height: 500;" id="foo"></div>"""

File tw2/jit/samples/chart.py

View file
     base_url = '/area_chart_data/'
 
 import tw2.core as twc
-twc.register_controller(DemoAreaChart, 'area_chart_data')
+twc.core.request_local()['middleware'].controllers.register(DemoAreaChart,
+                                                            'area_chart_data')
 
 from tw2.jit.widgets import BarChart
 from tw2.jit.samples.samples_data import BarChartJSONSampleData

File tw2/jit/samples/sqla.py

View file
     }
 
 import tw2.core as twc
-twc.register_controller(DemoSQLARadialGraph, 'db_radialgraph_demo')
+mw = twc.core.request_local()['middleware']
+mw.controllers.register(DemoSQLARadialGraph, 'db_radialgraph_demo')

File tw2/jit/widgets/core.py

View file
 
 import tw2.core as twc
 from tw2.core.resources import JSLink, CSSLink
-from tw2.core.resources import JSSymbol, _JSFuncCall as JSFuncCall
+from tw2.core.resources import JSSymbol, JSFuncCall
 from tw2.core.resources import JSSource
 from tw2.core.resources import encoder
 from tw2.core.widgets import WidgetMeta
             exec_delay=self.init_delay,
             setupcall=setupcall,
             loadcall=loadcall,
-            postcall=postcall,
-        )
+            postcall=postcall)
 
         self.resources.append(composite_js_call)