Commits

Ginés Martínez Sánchez  committed 86de15c Draft

doing inter_event example

  • Participants
  • Parent commits 55f4bb6

Comments (0)

Files changed (5)

File ginsfsm/examples/inter_event/banco/banco.ini

 
 [app:wsgi-server]
 use = egg:banco#main
-gaplic_name = main_gaplic
+gaplic_name = banco
 application = wsgi-application
 GWsgiServer.host = 0.0.0.0
-GWsgiServer.port = 8000
+GWsgiServer.port = 8001
 GSock.trace_dump = true
 GObj.trace_mach = true
 GObj.trace_creation = false
 
 [app:wsgi-application]
 use = egg:banco#pyramid_app
-gaplic = main_gaplic
+gaplic = banco
 
 pyramid.reload_templates = true
 pyramid.debug_authorization = true

File ginsfsm/examples/inter_event/banco/banco/main.py

 #       To run with gserve banco.ini
 #===============================================================
 def pyramid_paste_factory(global_config, **local_conf):
-    """ Returns the applic10 WSGI application.
+    """ Returns the WSGI application.
     """
     return pyramid_wsgi_app(global_config, **local_conf)
 
         'gaplic_name': 'main_gaplic',
         'application': 'wsgi-application',
         'GWsgiServer.host': '0.0.0.0',
-        'GWsgiServer.port': 8000,
+        'GWsgiServer.port': 8001,
         'GSock.trace_dump': True,
         'GObj.trace_mach': True,
         'GObj.trace_creation': False,

File ginsfsm/examples/inter_event/banco/banco/pyramid_app/templates/mytemplate.pt

           <div><img src="${request.static_url('banco:pyramid_app/static/pyramid.png')}" width="750" height="169" alt="pyramid"/></div>
       </div>
     </div>
-    <div id="middle">
-      <div class="middle align-center">
-        <p class="app-welcome">
-          Welcome to <span class="app-name">${project}</span>, an application generated by<br/>
-          the Pyramid web application development framework.
-        </p>
-      </div>
-    </div>
     <div id="bottom">
       <div class="bottom">
-        <div id="left" class="align-right">
-          <h2>Search documentation</h2>
-          <form method="get" action="http://docs.pylonsproject.org/projects/pyramid/en/1.4-branch/search.html">
-                <input type="text" id="q" name="q" value="" />
-                <input type="submit" id="x" value="Go" />
-            </form>
-        </div>
-        <div id="right" class="align-left">
-          <h2>Pyramid links</h2>
-          <ul class="links">
-            <li>
-              <a href="http://pylonsproject.org">Pylons Website</a>
-            </li>
-            <li>
-              <a href="http://docs.pylonsproject.org/projects/pyramid/en/1.4-branch/#narrative-documentation">Narrative Documentation</a>
-            </li>
-            <li>
-              <a href="http://docs.pylonsproject.org/projects/pyramid/en/1.4-branch/#reference-material">API Documentation</a>
-            </li>
-            <li>
-              <a href="http://docs.pylonsproject.org/projects/pyramid/en/1.4-branch/#tutorials">Tutorials</a>
-            </li>
-            <li>
-              <a href="http://docs.pylonsproject.org/projects/pyramid/en/1.4-branch/#detailed-change-history">Change History</a>
-            </li>
-            <li>
-              <a href="http://docs.pylonsproject.org/projects/pyramid/en/1.4-branch/#sample-applications">Sample Applications</a>
-            </li>
-            <li>
-              <a href="http://docs.pylonsproject.org/projects/pyramid/en/1.4-branch/#support-and-development">Support and Development</a>
-            </li>
-            <li>
-              <a href="irc://irc.freenode.net#pyramid">IRC Channel</a>
-            </li>
-            </ul>
-        </div>
+        <h1>Bienvenido al banco "Gran Villain"</h1>
+        <table>
+        <tbody><tr>
+          <td>Nombre</td>
+          <td><input id="registro_nombre" type="text" /></td>
+          <td><input id="registro_button" value="Resgístrese!" type="button" /></td>
+          <td>Registro</td>
+          <td><input id="registro_resultado" disabled="disabled" readonly="readonly" type="text" /></td>
+        </tr>
+        <tr>
+          <td>Euros</td>
+          <td><input id="prestamo_cantidad" type="text" /></td>
+          <td><input id="prestamo_button" value="Pedir un prestamo!" type="button" /></td>
+          <td>Total</td>
+          <td><input id="prestamo_total" disabled="disabled" readonly="readonly" type="text" /></td>
+        </tr>
+        <tr>
+          <td>Acciones</td>
+          <td><input id="acciones_cantidad" /></td>
+          <td><input id="acciones_button" value="Comprar acciones!" type="button" /></td>
+          <td>Total</td>
+          <td><input id="acciones_total" disabled="disabled" readonly="readonly" type="text" /></td>
+        </tr>
+        <tr>
+          <td></td>
+          <td></td>
+          <td></td>
+          <td>Saldo</td>
+          <td><input id="saldo_total" disabled="disabled" readonly="readonly" type="text" /></td>
+        </tr>
+        </tbody></table>
+
       </div>
     </div>
   </div>

File ginsfsm/examples/inter_event/schema.svg

    height="888.02795"
    id="svg2985"
    version="1.1"
-   inkscape:version="0.48.4 r9939"
+   inkscape:version="0.48.3.1 r9886"
    sodipodi:docname="schema.svg">
   <defs
      id="defs2987">
      inkscape:pageshadow="2"
      inkscape:zoom="0.84006365"
      inkscape:cx="487.96991"
-     inkscape:cy="348.7831"
+     inkscape:cy="301.16766"
      inkscape:current-layer="layer1"
      inkscape:document-units="px"
      showgrid="false"
-     inkscape:window-width="1280"
-     inkscape:window-height="948"
+     inkscape:window-width="1366"
+     inkscape:window-height="692"
      inkscape:window-x="0"
      inkscape:window-y="24"
      inkscape:window-maximized="1"
          sodipodi:role="line"
          x="768.40326"
          y="569.82635"
-         id="tspan4586">Extra-role: ^cliente ↑</tspan></text>
+         id="tspan4586">Extra-role: ^cliente ↑</tspan><tspan
+         sodipodi:role="line"
+         x="768.40326"
+         y="584.82635"
+         id="tspan3166" /><tspan
+         sodipodi:role="line"
+         x="768.40326"
+         y="599.82635"
+         id="tspan3168">Servidor Web: http://localhost:8001</tspan></text>
     <flowRoot
        xml:space="preserve"
        id="flowRoot3001"
          sodipodi:role="line"
          id="tspan4359"
          x="251"
-         y="612">Pyramid Web Server + sockjs server</tspan></text>
+         y="612">Pyramid Web Server + sockjs server:  http://localhost:8001/__pyramid_router__</tspan></text>
     <rect
        style="fill:#deda61;fill-opacity:1"
        id="rect3017"
          sodipodi:role="line"
          id="tspan4469"
          x="262"
-         y="437">Server websocket</tspan></text>
+         y="437">Server websocket: 8002</tspan></text>
     <text
        xml:space="preserve"
        style="font-size:12px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
            y="259"
            x="254"
            id="tspan4473"
-           sodipodi:role="line">Server websocket</tspan></text>
+           sodipodi:role="line">Server websocket: 8003</tspan></text>
       <g
          id="g4487-5-8"
          transform="translate(-357.5,-210)">
          sodipodi:role="line"
          id="tspan4473-1"
          x="559.40417"
-         y="264.16415">Server websocket</tspan></text>
+         y="264.16415">Server websocket: 8004</tspan></text>
     <path
        sodipodi:type="arc"
        style="fill:#ff8080;fill-opacity:1"
        sodipodi:cy="412"
        sodipodi:rx="50.5"
        sodipodi:ry="21"
-       d="m 725,412 a 50.5,21 0 1 1 -101,0 50.5,21 0 1 1 101,0 z"
+       d="m 725,412 c 0,11.59798 -22.60962,21 -50.5,21 -27.89038,0 -50.5,-9.40202 -50.5,-21 0,-11.59798 22.60962,-21 50.5,-21 27.89038,0 50.5,9.40202 50.5,21 z"
        transform="matrix(0.36355601,0,0,0.63154719,34.767392,430.12002)" />
     <g
        id="g3724"

File ginsfsm/scaffolds/simple_pyramid/+package+/main.py_tmpl

 #       To run with gserve {{package}}.ini
 #===============================================================
 def pyramid_paste_factory(global_config, **local_conf):
-    """ Returns the applic10 WSGI application.
+    """ Returns the WSGI application.
     """
     return pyramid_wsgi_app(global_config, **local_conf)