def main(): import webbrowser from jigna.api import View model = Model3D() view = View(body_html=body_html) webbrowser.open_new('http://localhost:8888') view.serve(model=model)
def setUpClass(cls): app = QtGui.QApplication.instance() or QtGui.QApplication([]) person_view = View(body_html=body_html) fred = Person(name='Fred', age=42) person_view.show(model=fred) GUI.process_events() cls.person_view = person_view cls.fred = fred cls.app = app
def start_server(self): from jigna.api import View view = View(body_html='') self.view = view from threading import Thread t = Thread(target=lambda: view.serve(port=self.port)) t.daemon = True t.start() self.server_thread = t
def test_standalone(): model = Model() from jigna.api import View v = View(body_html=model.get_html()) v.serve(model=model)