diff --git a/fabfile.py b/fabfile.py index 2a1f6018..f62ef8ea 100644 --- a/fabfile.py +++ b/fabfile.py @@ -27,7 +27,7 @@ def create_user(username): run('EDITOR="cp /tmp/sudoers.new" visudo') uncomment('~%s/.bashrc' % username, '#force_color_prompt=yes') -def install_web2py(): +def install_web2py(): """fab -H username@host install_web2py""" sudo('wget https://raw.githubusercontent.com/web2py/web2py/master/scripts/%s' % INSTALL_SCRIPT) sudo('chmod +x %s' % INSTALL_SCRIPT) @@ -119,7 +119,7 @@ def deploy(appname=None, all=False): os.unlink(zipfile) backup = mkdir_or_backup(appname) - + if all=='all' or not backup: local('zip -r _update.zip * -x *~ -x .* -x \#* -x *.bak -x *.bak2') else: @@ -131,10 +131,10 @@ def deploy(appname=None, all=False): sudo('unzip -o /tmp/_update.zip') sudo('chown -R www-data:www-data *') sudo('echo "%s" > DATE_DEPLOYMENT' % now) - + finally: sudo('rm /tmp/_update.zip') - + if backup: print 'TO RESTORE: fab restore:%s' % backup @@ -154,10 +154,10 @@ def deploynobackup(appname=None): sudo('unzip -o /tmp/_update.zip') sudo('chown -R www-data:www-data *') sudo('echo "%s" > DATE_DEPLOYMENT' % now) - + finally: sudo('rm /tmp/_update.zip') - + def restore(backup): """fab -H username@host restore:backupfilename""" appname = backup.split('/')[-1].split('.')[0] diff --git a/gluon/admin.py b/gluon/admin.py index 842d853d..0d207e2e 100644 --- a/gluon/admin.py +++ b/gluon/admin.py @@ -36,7 +36,7 @@ REGEX_EXTEND = r"""^\s*(?P\{\{\s*extend\s+['"](?P[^'"]+)['"]\s*\}\})" REGEX_INCLUDE = r"""(?P\{\{\s*include\s+['"](?P[^'"]+)['"]\s*\}\})""" -# TODO: swap arguments, let first ('r' or whatever) be mandatory +# TODO: swap arguments, let first ('r' or whatever) be mandatory def apath(path='', r=None): """Builds a path inside an application folder diff --git a/gluon/authapi.py b/gluon/authapi.py index 2158d0a5..220ba437 100644 --- a/gluon/authapi.py +++ b/gluon/authapi.py @@ -444,7 +444,6 @@ class AuthAPI(object): if type(description).__name__ == 'lazyT': description = description.m if not user_id or self.table_user()[user_id]: - description = description.replace('%', '%%') self.table_event().insert( description=str(description % vars), origin=origin, user_id=user_id) diff --git a/gluon/sqlhtml.py b/gluon/sqlhtml.py index caa1249a..438e4333 100644 --- a/gluon/sqlhtml.py +++ b/gluon/sqlhtml.py @@ -2666,7 +2666,7 @@ class SQLFORM(FORM): otablename, ofieldname = order.split('~')[-1].split('.', 1) sort_field = db[otablename][ofieldname] orderby = sort_field if order[:1] != '~' else ~sort_field - + orderby = fix_orderby(orderby) # expcolumns start with the visible columns, which @@ -2815,11 +2815,11 @@ class SQLFORM(FORM): if key == order.lstrip('~'): if inverted: if key == order: - key, marker = 'None', asc_icon + key, marker = 'None', asc_icon else: key, marker = order[1:], desc_icon else: - if key == order: + if key == order: key, marker = '~' + order, asc_icon else: key, marker = 'None', desc_icon diff --git a/gluon/validators.py b/gluon/validators.py index 31926640..c51f9014 100644 --- a/gluon/validators.py +++ b/gluon/validators.py @@ -1,3 +1,2 @@ from pydal.validators import * from pydal.validators import simple_hash, get_digest, Validator, ValidationError, translate, __all__ -