From 084e36d0ea7fd8713acfc2880fde30980bf2efea Mon Sep 17 00:00:00 2001 From: mdipierro Date: Mon, 27 Aug 2012 12:55:41 -0500 Subject: [PATCH] fixed a bunch of typos form recent commits, thanks Jonathan --- VERSION | 2 +- gluon/globals.py | 2 +- gluon/html.py | 3 ++- gluon/sqlhtml.py | 4 +++- gluon/template.py | 2 +- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/VERSION b/VERSION index c41f95c8..4a117f30 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.00.0 (2012-08-27 12:15:26) dev +Version 2.00.0 (2012-08-27 12:55:36) dev diff --git a/gluon/globals.py b/gluon/globals.py index 7bf41549..ab6ec9ad 100644 --- a/gluon/globals.py +++ b/gluon/globals.py @@ -458,7 +458,7 @@ class Session(Storage): response.session_cookie_key2 = hashlib.md5(cookie_key).digest() cookie_name = request.application.lower()+'_session_data' response.session_cookie_name = cookie_name - if cookie_data in request.cookies: + if cookie_name in request.cookies: cookie_value = request.cookies[cookie_name].value cookie_parts = cookie_value.split(":") enc = cookie_parts[2] diff --git a/gluon/html.py b/gluon/html.py index 2dd3e83a..5f7847f3 100644 --- a/gluon/html.py +++ b/gluon/html.py @@ -814,7 +814,8 @@ class DIV(XmlComponent): c.latest = self.latest c.session = self.session c.formname = self.formname - if hideerror and not attributes.get('hideerror',False): + if hideerror and not \ + self.attributes.get('hideerror',False): c['hideerror'] = hideerror newstatus = c._traverse(status,hideerror) and newstatus diff --git a/gluon/sqlhtml.py b/gluon/sqlhtml.py index 736e7492..6f3b9220 100644 --- a/gluon/sqlhtml.py +++ b/gluon/sqlhtml.py @@ -36,6 +36,8 @@ import re import cStringIO from gluon import current, redirect, A, URL, DIV, H3, UL, LI, SPAN, INPUT import inspect +import settings +is_gae = settings.global_settings.web2py_runtime_gae table_field = re.compile('[\w_]+\.[\w_]+') widget_class = re.compile('^\w*') @@ -581,7 +583,7 @@ class AutocompleteWidget(object): def callback(self): if self.keyword in self.request.vars: field = self.fields[0] - if settings.global_settings.web2py_runtime_gae: + if is_gae: rows = self.db(field.__ge__(self.request.vars[self.keyword])&field.__lt__(self.request.vars[self.keyword]+ u'\ufffd')).select(orderby=self.orderby,limitby=self.limitby,*self.fields) else: rows = self.db(field.like(self.request.vars[self.keyword]+'%')).select(orderby=self.orderby,limitby=self.limitby,distinct=self.distinct,*self.fields) diff --git a/gluon/template.py b/gluon/template.py index 3ea850fd..c1d71188 100644 --- a/gluon/template.py +++ b/gluon/template.py @@ -912,7 +912,7 @@ def render(content = "hello world", # Add it to the context so we can use it. if not 'NOESCAPE' in context: - context['NOESCAPE'] = XML + context['NOESCAPE'] = NOESCAPE # save current response class if context and 'response' in context: