- <div id="status_block">Your application is now running</div>
- <div id="sidebar">
- <h2>Learn more</h2>
- Learn more about TurboGears and take part in its
- development
- <ul class="links">
- <li><a href="http://www.turbogears.org">Official website</a></li>
- <li><a href="http://docs.turbogears.org">Documentation</a></li>
- <li><a href="http://trac.turbogears.org/turbogears/">Trac
- (bugs/suggestions)</a></li>
- <li><a href="http://groups.google.com/group/turbogears"> Mailing list</a> </li>
- </ul>
- <span py:replace="now">now</span>
- </div>
- <div id="getting_started">
- <ol id="getting_started_steps">
- <li class="getting_started">
- <h3>Model</h3>
- <p> <a href="http://docs.turbogears.org/1.0/GettingStarted/DefineDatabase">Design models</a> in the <span class="code">model.py</span>.<br/>
- Edit <span class="code">dev.cfg</span> to <a href="http://docs.turbogears.org/1.0/GettingStarted/UseDatabase">use a different backend</a>, or start with a pre-configured SQLite database. <br/>
- Use script <span class="code">tg-admin sql create</span> to create the database tables.</p>
- </li>
- <li class="getting_started">
- <h3>View</h3>
- <p> Edit <a href="http://docs.turbogears.org/1.0/GettingStarted/Kid">html-like templates</a> in the <span class="code">/templates</span> folder;<br/>
- Put all <a href="http://docs.turbogears.org/1.0/StaticFiles">static contents</a> in the <span class="code">/static</span> folder. </p>
- </li>
- <li class="getting_started">
- <h3>Controller</h3>
- <p> Edit <span class="code"> controllers.py</span> and <a href="http://docs.turbogears.org/1.0/GettingStarted/CherryPy">build your
- website structure</a> with the simplicity of Python objects. <br/>
- TurboGears will automatically reload itself when you modify your project. </p>
- </li>
- </ol>
- <div class="notice"> If you create something cool, please <a href="http://groups.google.com/group/turbogears">let people know</a>, and consider contributing something back to the <a href="http://groups.google.com/group/turbogears">community</a>.</div>
- </div>
- <!-- End of getting_started -->
+ <div py:if="'entregar' in identity.current.permissions and 'admin' not in identity.current.permissions">
+ <h2>Instancias de Entrega</h2>
+ <div py:if="len(instancias_activas)">
+ <ul py:for="instancia in instancias_activas">
+ <li>
+ <?python delta = instancia.fin - now ?>
+ La entrega ${instancia.numero} del
+ ejercicio ${instancia.ejercicio.numero} vence
+ el ${instancia.fin.strftime(r'%A %d de %B a las %R')}
+ <br />
+ (falta ${delta.days} días,
+ ${delta.seconds//3600} horas y
+ ${delta.seconds//60%60} minutos).
+ </li>
+ </ul>
+ </div>
+ <h2>Últimas entregas realizadas</h2>
+ <table py:if="len(entregas)">
+ <tr>
+ <th>Ejercicio</th>
+ <th>Fecha Entrega</th>
+ </tr>
+ <tr py:for="e in entregas">
+ <td>${e.instancia.ejercicio.shortrepr()}</td>
+ <td>${e.fecha}</td>
+ </tr>
+ </table>
+ </div>