diff --git a/VERSION b/VERSION index 23f15a0d..6825be0a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.4.1-alpha.2+timestamp.2013.01.08.09.22.34 +Version 2.4.1-alpha.2+timestamp.2013.01.08.11.35.00 diff --git a/gluon/reserved_sql_keywords.py b/gluon/reserved_sql_keywords.py index e5b0fd14..320711e6 100644 --- a/gluon/reserved_sql_keywords.py +++ b/gluon/reserved_sql_keywords.py @@ -1686,6 +1686,9 @@ SQLITE = set(( 'WHERE', )) + +MONGODB_NONRESERVED = set(('ID_', 'SAFE',)) + # remove from here when you add a list. JDBCSQLITE = SQLITE DB2 = INFORMIX = INGRES = JDBCPOSTGRESQL = COMMON @@ -1708,6 +1711,7 @@ ADAPTERS = { 'jdbc:sqlite': JDBCSQLITE, 'jdbc:postgres': JDBCPOSTGRESQL, 'common': COMMON, + 'mongodb_nonreserved': MONGODB_NONRESERVED } ADAPTERS['all'] = reduce(lambda a, b: a.union(b), ( diff --git a/gluon/sqlhtml.py b/gluon/sqlhtml.py index 36082b34..7f710e51 100644 --- a/gluon/sqlhtml.py +++ b/gluon/sqlhtml.py @@ -733,7 +733,7 @@ def formstyle_table2cols(form, fields): def formstyle_divs(form, fields): ''' divs only ''' - table = TAG['']() + table = FIELDSET() for id, label, controls, help in fields: _help = DIV(help, _class='w2p_fc') _controls = DIV(controls, _class='w2p_fw') @@ -765,7 +765,7 @@ def formstyle_ul(form, fields): def formstyle_bootstrap(form, fields): ''' bootstrap format form layout ''' - form['_class'] = 'form-horizontal' + form['_class'] += ' form-horizontal' parent = FIELDSET() for id, label, controls, help in fields: # wrappers @@ -799,12 +799,12 @@ def formstyle_bootstrap(form, fields): if _submit: # submit button has unwrapped label and controls, different class - parent.append(DIV(label, controls, _class='form-actions')) + parent.append(DIV(label, controls, _class='form-actions', _id=id)) # unflag submit (possible side effect) _submit = False else: # unwrapped label - parent.append(DIV(label, _controls, _class='control-group')) + parent.append(DIV(label, _controls, _class='control-group', _id=id)) return parent diff --git a/gluon/tools.py b/gluon/tools.py index 4644cc61..a30d45ce 100644 --- a/gluon/tools.py +++ b/gluon/tools.py @@ -3309,14 +3309,14 @@ class Auth(object): restrict_search=False, resolve=True, extra=None, - menugroups=None): + menu_groups=None): if not hasattr(self, '_wiki'): self._wiki = Wiki(self, render=render, manage_permissions=manage_permissions, force_prefix=force_prefix, restrict_search=restrict_search, env=env, extra=extra or {}, - menugroups=menugroups) + menu_groups=menu_groups) else: self._wiki.env.update(env or {}) # if resolve is set to True, process request as wiki call @@ -4726,7 +4726,7 @@ class Wiki(object): def __init__(self, auth, env=None, render='markmin', manage_permissions=False, force_prefix='', - restrict_search=False, extra=None, menugroups=None): + restrict_search=False, extra=None, menu_groups=None): self.env = env or {} self.env['component'] = Wiki.component if render == 'markmin': @@ -4735,7 +4735,7 @@ class Wiki(object): render = self.html_render self.render = render self.auth = auth - self.menugroups = menugroups + self.menu_groups = menu_groups if self.auth.user: self.force_prefix = force_prefix % self.auth.user else: @@ -4853,11 +4853,11 @@ class Wiki(object): return True def can_see_menu(self): - if self.menugroups is None: + if self.menu_groups is None: return True if self.auth.user: groups = self.auth.user_groups.values() - if any(t in self.menugroups for t in groups): + if any(t in self.menu_groups for t in groups): return True return False