Adding register new player command
This commit is contained in:
parent
115a8a7da5
commit
c22ce3452e
1 changed files with 15 additions and 0 deletions
15
app.py
15
app.py
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue