Example #1
0
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)
Example #2
0
 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
Example #3
0
 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
Example #4
0
def test_standalone():
    model = Model()
    from jigna.api import View

    v = View(body_html=model.get_html())
    v.serve(model=model)