diff --git a/pylons_app/config/routing.py b/pylons_app/config/routing.py --- a/pylons_app/config/routing.py +++ b/pylons_app/config/routing.py @@ -19,14 +19,15 @@ def make_map(config): map.connect('/error/{action}/{id}', controller='error') # CUSTOM ROUTES HERE - with map.submapper(path_prefix='/_admin', controller='admin') as m: - m.connect('admin_home', '/', action='index')#main page - m.connect('admin_add_repo', '/add_repo/{new_repo:[a-z0-9\. _-]*}', action='add_repo') + map.connect('hg_home', '/', controller='hg', action='index') map.resource('repo', 'repos', path_prefix='/_admin') map.resource('user', 'users', path_prefix='/_admin') - map.connect('hg_home', '/', controller='hg', action='index') + + with map.submapper(path_prefix='/_admin', controller='admin') as m: + m.connect('admin_home', '/', action='index')#main page + m.connect('admin_add_repo', '/add_repo/{new_repo:[a-z0-9\. _-]*}', action='add_repo') map.connect('hg', '/{path_info:.*}', controller='hg', action="view", path_info='/') diff --git a/pylons_app/controllers/users.py b/pylons_app/controllers/users.py --- a/pylons_app/controllers/users.py +++ b/pylons_app/controllers/users.py @@ -105,10 +105,10 @@ class UsersController(BaseController): """GET /users/id/edit: Form to edit an existing item""" # url('edit_user', id=ID) c.user = self.sa.query(Users).get(id) - print c.user.__dict__ + defaults = c.user.__dict__ return htmlfill.render( render('/user_edit.html'), - defaults=c.user.__dict__, + defaults=defaults, encoding="UTF-8", force_defaults=False ) diff --git a/pylons_app/templates/user_edit.html b/pylons_app/templates/user_edit.html --- a/pylons_app/templates/user_edit.html +++ b/pylons_app/templates/user_edit.html @@ -36,7 +36,7 @@ ${_('Active')} - ${h.checkbox('active')} + ${h.checkbox('active',value=True)}