aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorSam2013-08-28 16:21:12 -0500
committerSam2013-08-28 16:21:12 -0500
commitcd4d985e7142f92e18f8cf316c72073cb3609a85 (patch)
tree44d65af727d73b874f407805f30500af3da44c41 /wqflask
parentf2e41174a7e2091e7e835b137c6c7e2874feda04 (diff)
downloadgenenetwork2-cd4d985e7142f92e18f8cf316c72073cb3609a85.tar.gz
Various changes to track down what happens with security modules
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/flask_security/core.py1
-rw-r--r--wqflask/flask_security/datastore.py1
-rw-r--r--wqflask/flask_security/forms.py3
-rw-r--r--wqflask/flask_security/registerable.py1
-rw-r--r--wqflask/secure_server.py15
5 files changed, 21 insertions, 0 deletions
diff --git a/wqflask/flask_security/core.py b/wqflask/flask_security/core.py
index d794fad5..0f3a231f 100644
--- a/wqflask/flask_security/core.py
+++ b/wqflask/flask_security/core.py
@@ -207,6 +207,7 @@ def _get_serializer(app, name):
def _get_state(app, datastore, **kwargs):
for key, value in get_config(app).items():
+ print "in _get_state [{}]: {}".format(key, value)
kwargs[key.lower()] = value
kwargs.update(dict(
diff --git a/wqflask/flask_security/datastore.py b/wqflask/flask_security/datastore.py
index f8c7218d..634399d9 100644
--- a/wqflask/flask_security/datastore.py
+++ b/wqflask/flask_security/datastore.py
@@ -157,6 +157,7 @@ class UserDatastore(object):
"""Creates and returns a new user from the given parameters."""
user = self.user_model(**self._prepare_create_user_args(**kwargs))
+ print "in abstraced create_user, user is:", user
return self.put(user)
def delete_user(self, user):
diff --git a/wqflask/flask_security/forms.py b/wqflask/flask_security/forms.py
index e64e1502..4c1dc894 100644
--- a/wqflask/flask_security/forms.py
+++ b/wqflask/flask_security/forms.py
@@ -89,6 +89,8 @@ def valid_user_email(form, field):
class Form(BaseForm):
def __init__(self, *args, **kwargs):
+ print "in Form, args:", args
+ print "in Form, kwargs:", kwargs
if current_app.testing:
self.TIME_LIMIT = None
super(Form, self).__init__(*args, **kwargs)
@@ -148,6 +150,7 @@ class RegisterFormMixin():
def to_dict(form):
def is_field_and_user_attr(member):
+ print "in ifaua:", member
return isinstance(member, Field) and \
hasattr(_datastore.user_model, member.name)
diff --git a/wqflask/flask_security/registerable.py b/wqflask/flask_security/registerable.py
index 4e9f357d..4606c7c6 100644
--- a/wqflask/flask_security/registerable.py
+++ b/wqflask/flask_security/registerable.py
@@ -24,6 +24,7 @@ _datastore = LocalProxy(lambda: _security.datastore)
def register_user(**kwargs):
+ print "in register_user kwargs:", kwargs
confirmation_link, token = None, None
kwargs['password'] = encrypt_password(kwargs['password'])
user = _datastore.create_user(**kwargs)
diff --git a/wqflask/secure_server.py b/wqflask/secure_server.py
index 04b85663..b877c544 100644
--- a/wqflask/secure_server.py
+++ b/wqflask/secure_server.py
@@ -28,6 +28,21 @@ logging_tree.printout()
import sys
print("At startup, path is:", sys.path)
+
+########
+def tracefunc(frame, event, arg, indent=[0]):
+ if event == "call":
+ indent[0] += 2
+ print("-" * indent[0] + "> call function", frame.f_code.co_name)
+ elif event == "return":
+ print("<" + "-" * indent[0], "exit function", frame.f_code.co_name)
+ indent[0] -= 2
+ return tracefunc
+
+import sys
+sys.settrace(tracefunc)
+##############
+
#print("app.config is:", app.config)
if __name__ == '__main__':