From c22ce3452ecf0f1b9f17ad3a9bfd86fac682d9dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Carlos=20Cuevas?= Date: Mon, 3 Jun 2013 12:59:30 +0200 Subject: [PATCH] Adding register new player command --- app.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/app.py b/app.py index 93c6c29..60bc2c0 100644 --- a/app.py +++ b/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):