Modified to respond to tyedye instead of app

This commit is contained in:
José Carlos Cuevas 2013-06-06 11:35:03 +02:00
parent 551f6e5a80
commit 59b7f1533f
6 changed files with 22 additions and 34 deletions

28
app.py
View file

@ -12,20 +12,20 @@ render = web.template.render('views/')
db = web.database(dbn = 'sqlite', db = 'game.db')
urls = (
'/app', 'summary',
'/app/', 'summary',
'/app/stats', 'statistics',
'/app/stats/', 'statistics',
'/app/stats/add', 'stat_add',
'/app/stats/remove/(.+)', 'remove_stat',
'/app/stats/edit/(.+)', 'edit_stat',
'/app/register', 'register',
'/app/register/', 'register',
'/app/player/(.+)', 'player',
'/app/player_remove/(.+)', 'remove_player',
'/app/player_edit/(.+)', 'edit_player',
'/app/config', 'config',
'/app/config/', 'config',
'/tyedye', 'summary',
'/tyedye/', 'summary',
'/tyedye/stats', 'statistics',
'/tyedye/stats/', 'statistics',
'/tyedye/stats/add', 'stat_add',
'/tyedye/stats/remove/(.+)', 'remove_stat',
'/tyedye/stats/edit/(.+)', 'edit_stat',
'/tyedye/register', 'register',
'/tyedye/register/', 'register',
'/tyedye/player/(.+)', 'player',
'/tyedye/player_remove/(.+)', 'remove_player',
'/tyedye/player_edit/(.+)', 'edit_player',
'/tyedye/config', 'config',
'/tyedye/config/', 'config',
'/query/(.+)', 'query',
)

View file

@ -85,18 +85,6 @@ $def with (main_block, sidebar_block, game_name)
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="/static/js/jquery.js"></script>
<script src="/static/js/bootstrap-transition.js"></script>
<script src="/static/js/bootstrap-alert.js"></script>
<script src="/static/js/bootstrap-modal.js"></script>
<script src="/static/js/bootstrap-dropdown.js"></script>
<script src="/static/js/bootstrap-scrollspy.js"></script>
<script src="/static/js/bootstrap-tab.js"></script>
<script src="/static/js/bootstrap-tooltip.js"></script>
<script src="/static/js/bootstrap-popover.js"></script>
<script src="/static/js/bootstrap-button.js"></script>
<script src="/static/js/bootstrap-collapse.js"></script>
<script src="/static/js/bootstrap-carousel.js"></script>
<script src="/static/js/bootstrap-typeahead.js"></script>
</body>
</html>

View file

@ -8,4 +8,4 @@ $for stat in stats:
<li>$stat: $stats[stat]</li>
</ul>
$if edit_links:
<p><a href="/app/player_edit/$player_name">[edit]</a>&nbsp;<a href="/app/player_remove/$player_name">[remove]</a></p>
<p><a href="/tyedye/player_edit/$player_name">[edit]</a>&nbsp;<a href="/tyedye/player_remove/$player_name">[remove]</a></p>

View file

@ -1,7 +1,7 @@
<ul class="nav nav-list">
<li class="nav-header">Access</li>
<li><a href='/app'>Main</a></li>
<li><a href='/app/register'>Register New Player</a></li>
<li><a href='/app/config'>Configuration</a></li>
<li><a href='/app/stats'>Statistics</a></li>
<li><a href='/tyedye'>Main</a></li>
<li><a href='/tyedye/register'>Register New Player</a></li>
<li><a href='/tyedye/config'>Configuration</a></li>
<li><a href='/tyedye/stats'>Statistics</a></li>
</ul>

View file

@ -4,8 +4,8 @@ $for stat in stats:
<div class="row">
<div class="span1">$stat.name</div>
<div class="span2">(default: $stat.default_value)</div>
<div class="span1"><a href="/app/stats/edit/$stat.id">[edit]</a></div>
<div class="span1"><a href="/app/stats/remove/$stat.id">[remove]</a></div>
<div class="span1"><a href="/tyedye/stats/edit/$stat.id">[edit]</a></div>
<div class="span1"><a href="/tyedye/stats/remove/$stat.id">[remove]</a></div>
</div>
<div class="stat_form">
<form name="add_stat_form" method="post" action="stats/add">

View file

@ -5,5 +5,5 @@ $def with (game_name, player_num, stats_num, player_list)
<p>Player list:<br />
<ul>
$for player in player_list:
<li><a href="/app/player/$player">$player</a></li>
<li><a href="/tyedye/player/$player">$player</a></li>
</ul>