fixed use of whitespaces
This commit is contained in:
+5
-5
@@ -20,10 +20,10 @@ DEFAULT = lambda: None
|
|||||||
class AuthAPI(object):
|
class AuthAPI(object):
|
||||||
"""
|
"""
|
||||||
AuthAPI is a barebones Auth implementation which does not have a concept of
|
AuthAPI is a barebones Auth implementation which does not have a concept of
|
||||||
HTML forms or redirects, emailing or even an URL, you are responsible for
|
HTML forms or redirects, emailing or even an URL, you are responsible for
|
||||||
all that if you use it.
|
all that if you use it.
|
||||||
The main Auth functions such as login, logout, register, profile are designed
|
The main Auth functions such as login, logout, register, profile are designed
|
||||||
in a Dict In -> Dict Out logic so, for instance, if you set
|
in a Dict In -> Dict Out logic so, for instance, if you set
|
||||||
registration_requires_verification you are responsible for sending the key to
|
registration_requires_verification you are responsible for sending the key to
|
||||||
the user and even rolling back the transaction if you can't do it.
|
the user and even rolling back the transaction if you can't do it.
|
||||||
|
|
||||||
@@ -245,13 +245,13 @@ class AuthAPI(object):
|
|||||||
migrate = db._migrate
|
migrate = db._migrate
|
||||||
if fake_migrate is None:
|
if fake_migrate is None:
|
||||||
fake_migrate = db._fake_migrate
|
fake_migrate = db._fake_migrate
|
||||||
|
|
||||||
settings = self.settings
|
settings = self.settings
|
||||||
if username is None:
|
if username is None:
|
||||||
username = settings.use_username
|
username = settings.use_username
|
||||||
else:
|
else:
|
||||||
settings.use_username = username
|
settings.use_username = username
|
||||||
|
|
||||||
if not self.signature:
|
if not self.signature:
|
||||||
self.define_signature()
|
self.define_signature()
|
||||||
if signature is True:
|
if signature is True:
|
||||||
@@ -1012,7 +1012,7 @@ class AuthAPI(object):
|
|||||||
):
|
):
|
||||||
"""
|
"""
|
||||||
Verify a given registration_key actually exists in the user table.
|
Verify a given registration_key actually exists in the user table.
|
||||||
Resets the key to empty string '' or 'pending' if
|
Resets the key to empty string '' or 'pending' if
|
||||||
setttings.registration_requires_approval is true.
|
setttings.registration_requires_approval is true.
|
||||||
|
|
||||||
Keyword Args:
|
Keyword Args:
|
||||||
|
|||||||
+1
-1
@@ -225,7 +225,7 @@ def parsecronline(line):
|
|||||||
params = line.strip().split(None, 6)
|
params = line.strip().split(None, 6)
|
||||||
if len(params) < 7:
|
if len(params) < 7:
|
||||||
return None
|
return None
|
||||||
daysofweek = {'sun': 0, 'mon': 1, 'tue': 2, 'wed': 3,
|
daysofweek = {'sun': 0, 'mon': 1, 'tue': 2, 'wed': 3,
|
||||||
'thu': 4, 'fri': 5, 'sat': 6}
|
'thu': 4, 'fri': 5, 'sat': 6}
|
||||||
for (s, id) in zip(params[:5], ['min', 'hr', 'dom', 'mon', 'dow']):
|
for (s, id) in zip(params[:5], ['min', 'hr', 'dom', 'mon', 'dow']):
|
||||||
if not s in [None, '*']:
|
if not s in [None, '*']:
|
||||||
|
|||||||
+1
-1
Submodule gluon/packages/dal updated: 6eece91971...f66ad17694
+4
-4
@@ -1922,8 +1922,8 @@ class SQLFORM(FORM):
|
|||||||
del attributes['table_name']
|
del attributes['table_name']
|
||||||
|
|
||||||
# Clone fields, while passing tables straight through
|
# Clone fields, while passing tables straight through
|
||||||
fields_with_clones = [f.clone() if isinstance(f, Field) else f for f in fields]
|
fields_with_clones = [f.clone() if isinstance(f, Field) else f for f in fields]
|
||||||
|
|
||||||
return SQLFORM(DAL(None).define_table(table_name, *fields_with_clones), **attributes)
|
return SQLFORM(DAL(None).define_table(table_name, *fields_with_clones), **attributes)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
@@ -3161,8 +3161,8 @@ class SQLFORM(FORM):
|
|||||||
# if isinstance(linked_tables, dict):
|
# if isinstance(linked_tables, dict):
|
||||||
# linked_tables = linked_tables.get(table._tablename, [])
|
# linked_tables = linked_tables.get(table._tablename, [])
|
||||||
if linked_tables is None or referee in linked_tables:
|
if linked_tables is None or referee in linked_tables:
|
||||||
field.represent = (lambda id, r=None, referee=referee, rep=field.represent:
|
field.represent = (lambda id, r=None, referee=referee, rep=field.represent:
|
||||||
A(callable(rep) and rep(id) or id,
|
A(callable(rep) and rep(id) or id,
|
||||||
cid=request.cid, _href=url(args=['view', referee, id])))
|
cid=request.cid, _href=url(args=['view', referee, id])))
|
||||||
except (KeyError, ValueError, TypeError):
|
except (KeyError, ValueError, TypeError):
|
||||||
redirect(URL(args=table._tablename))
|
redirect(URL(args=table._tablename))
|
||||||
|
|||||||
+3
-3
@@ -1792,7 +1792,7 @@ class Auth(AuthAPI):
|
|||||||
servicevalidate='serviceValidate',
|
servicevalidate='serviceValidate',
|
||||||
proxyvalidate='proxyValidate',
|
proxyvalidate='proxyValidate',
|
||||||
logout='logout'),
|
logout='logout'),
|
||||||
cas_create_user=True,
|
cas_create_user=True,
|
||||||
extra_fields={},
|
extra_fields={},
|
||||||
actions_disabled=[],
|
actions_disabled=[],
|
||||||
controller=controller,
|
controller=controller,
|
||||||
@@ -2285,7 +2285,7 @@ class Auth(AuthAPI):
|
|||||||
If the user doesn't yet exist, then they are created.
|
If the user doesn't yet exist, then they are created.
|
||||||
"""
|
"""
|
||||||
table_user = self.table_user()
|
table_user = self.table_user()
|
||||||
create_user = self.settings.cas_create_user
|
create_user = self.settings.cas_create_user
|
||||||
user = None
|
user = None
|
||||||
checks = []
|
checks = []
|
||||||
# make a guess about who this user is
|
# make a guess about who this user is
|
||||||
@@ -2318,7 +2318,7 @@ class Auth(AuthAPI):
|
|||||||
update_keys[key] = keys[key]
|
update_keys[key] = keys[key]
|
||||||
user.update_record(**update_keys)
|
user.update_record(**update_keys)
|
||||||
elif checks:
|
elif checks:
|
||||||
if create_user is False:
|
if create_user is False:
|
||||||
# Remove current open session a send message
|
# Remove current open session a send message
|
||||||
self.logout(next=None, onlogout=None, log=None)
|
self.logout(next=None, onlogout=None, log=None)
|
||||||
raise HTTP(403, "Forbidden. User need to be created first.")
|
raise HTTP(403, "Forbidden. User need to be created first.")
|
||||||
|
|||||||
+2
-2
@@ -140,7 +140,7 @@ class web2pyDialog(object):
|
|||||||
else:
|
else:
|
||||||
import tkinter
|
import tkinter
|
||||||
from tkinter import messagebox
|
from tkinter import messagebox
|
||||||
|
|
||||||
|
|
||||||
bg_color = 'white'
|
bg_color = 'white'
|
||||||
root.withdraw()
|
root.withdraw()
|
||||||
@@ -463,7 +463,7 @@ class web2pyDialog(object):
|
|||||||
import tkMessageBox as messagebox
|
import tkMessageBox as messagebox
|
||||||
else:
|
else:
|
||||||
from tkinter import messagebox
|
from tkinter import messagebox
|
||||||
|
|
||||||
messagebox.showerror('web2py start server', message)
|
messagebox.showerror('web2py start server', message)
|
||||||
|
|
||||||
def start(self):
|
def start(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user