Merge ssh://github.com/web2py/web2py
This commit is contained in:
commit
8cab6b8ac0
4 files changed
+17
-7
No files matched your search
@@ -1 +1 @@
|
|||||||
Version 2.5.1-stable+timestamp.2013.06.23.08.50.58
|
Version 2.5.1-stable+timestamp.2013.06.24.14.23.41
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
#### Learning and Demos
|
#### Learning and Demos
|
||||||
- [[Intro video http://www.youtube.com/watch?v=BXzqmHx6edY]] and [[code examples https://github.com/mjhea0/web2py]]
|
- [[Intro video http://www.youtube.com/watch?v=BXzqmHx6edY]] and [[code examples https://github.com/mjhea0/web2py]]
|
||||||
- [[Killer Web Development Tutorial http://killer-web-development.com/]]
|
- [[Killer Web Development Tutorial http://killer-web-development.com/]]
|
||||||
- [[Real Python for the Web http://www.kickstarter.com/projects/1369857650/real-python-for-web-development-featuring-web2py]]
|
- [[Real Python for the Web http://www.realpython.com]] (web development with web2py and more!)
|
||||||
- [[Admin Demo http://www.web2py.com/demo_admin popup]] (web-based IDE)
|
- [[Admin Demo http://www.web2py.com/demo_admin popup]] (web-based IDE)
|
||||||
- [[Welcome App Demo http://www.web2py.com/welcome]] (scaffolding application)
|
- [[Welcome App Demo http://www.web2py.com/welcome]] (scaffolding application)
|
||||||
- [[Videos http://www.web2py.com/examples/default/videos/]]
|
- [[Videos http://www.web2py.com/examples/default/videos/]]
|
||||||
|
|||||||
+14
-5
@@ -1257,11 +1257,20 @@ class BaseAdapter(ConnectionPool):
|
|||||||
|
|
||||||
def CONTAINS(self,first,second,case_sensitive=False):
|
def CONTAINS(self,first,second,case_sensitive=False):
|
||||||
if first.type in ('string','text', 'json'):
|
if first.type in ('string','text', 'json'):
|
||||||
second = Expression(None,self.CONCAT('%',Expression(
|
if isinstance(second,Expression):
|
||||||
None,self.REPLACE(second,('%','%%'))),'%'))
|
second = Expression(None,self.CONCAT('%',Expression(
|
||||||
|
None,self.REPLACE(second,('%','%%'))),'%'))
|
||||||
|
else:
|
||||||
|
second = '%'+str(second).replace('%','%%')+'%'
|
||||||
elif first.type.startswith('list:'):
|
elif first.type.startswith('list:'):
|
||||||
second = Expression(None,self.CONCAT('%|',Expression(None,self.REPLACE(
|
if isinstance(second,Expression):
|
||||||
Expression(None,self.REPLACE(second,('%','%%'))),('|','||'))),'|%'))
|
second = Expression(None,self.CONCAT(
|
||||||
|
'%|',Expression(None,self.REPLACE(
|
||||||
|
Expression(None,self.REPLACE(
|
||||||
|
second,('%','%%'))),('|','||'))),'|%'))
|
||||||
|
else:
|
||||||
|
second = '%|'+str(second).replace('%','%%')\
|
||||||
|
.replace('|','||')+'|%'
|
||||||
op = case_sensitive and self.LIKE or self.ILIKE
|
op = case_sensitive and self.LIKE or self.ILIKE
|
||||||
return op(first,second)
|
return op(first,second)
|
||||||
|
|
||||||
@@ -6866,7 +6875,7 @@ class Row(object):
|
|||||||
def __setitem__(self, key, value):
|
def __setitem__(self, key, value):
|
||||||
setattr(self, str(key), value)
|
setattr(self, str(key), value)
|
||||||
|
|
||||||
__delitem__ = delattr
|
__delitem__ = object.__delattr__
|
||||||
|
|
||||||
__copy__ = lambda self: Row(self)
|
__copy__ = lambda self: Row(self)
|
||||||
|
|
||||||
|
|||||||
@@ -1792,6 +1792,7 @@ class Auth(object):
|
|||||||
keys['first_name'] = keys.get('username', guess)
|
keys['first_name'] = keys.get('username', guess)
|
||||||
user_id = table_user.insert(**table_user._filter_fields(keys))
|
user_id = table_user.insert(**table_user._filter_fields(keys))
|
||||||
user = self.user = table_user[user_id]
|
user = self.user = table_user[user_id]
|
||||||
|
print user
|
||||||
if self.settings.create_user_groups:
|
if self.settings.create_user_groups:
|
||||||
group_id = self.add_group(
|
group_id = self.add_group(
|
||||||
self.settings.create_user_groups % user)
|
self.settings.create_user_groups % user)
|
||||||
|
|||||||
Reference in new issue
Block a user