Adding register new player command

This commit is contained in:
José Carlos Cuevas 2013-06-03 12:59:30 +02:00
parent 115a8a7da5
commit c22ce3452e

15
app.py
View file

@ -17,6 +17,8 @@ urls = (
'/app/config/add', 'stat_add',
'/app/config/remove/(.+)', 'remove_stat',
'/app/config/edit/(.+)', 'edit_stat',
'/app/register', 'register',
'/app/register/', 'register',
)
# Forms used by the app
@ -41,6 +43,19 @@ def render_web(game_name, main_block):
sidebar = render.sidebar()
return render.layout(main_block, sidebar, game_name)
def dynamic_register_form():
"""
Creates a register new player dynamicly
"""
reg_elems = [form.Textbox('name',
description = 'Player name:')]
for stat in db.select('stats'):
textbox = form.Textbox(stat.name,
value = stat.default_value)
# Server calls
class summary(object):