From 0e633460f37cb9b7c23805c4c31b1044e0704d1b Mon Sep 17 00:00:00 2001 From: Sam Date: Thu, 13 Jun 2013 20:13:22 +0000 Subject: Small changes --- wqflask/wqflask/model.py | 3 +-- wqflask/wqflask/user_manager.py | 6 ++++++ wqflask/wqflask/views.py | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/model.py b/wqflask/wqflask/model.py index 296f1f0d..5beba9ff 100644 --- a/wqflask/wqflask/model.py +++ b/wqflask/wqflask/model.py @@ -64,5 +64,4 @@ security = Security(app, user_datastore) db.metadata.create_all(db.engine) - - +user_datastore.create_role(name="Genentech", description="Genentech Beta Project(testing)") diff --git a/wqflask/wqflask/user_manager.py b/wqflask/wqflask/user_manager.py index 97ba18a3..b8ebc71f 100644 --- a/wqflask/wqflask/user_manager.py +++ b/wqflask/wqflask/user_manager.py @@ -32,3 +32,9 @@ class UserManager(object): #print("user is:", user) self.user = model.User.query.get(self.user_id) print("user is:", self.user) + + +class RolesManager(object): + def __init__(self): + self.roles = model.Role.query.all() + print("Roles are:", self.roles) diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py index b59c3b34..f92042bd 100644 --- a/wqflask/wqflask/views.py +++ b/wqflask/wqflask/views.py @@ -69,7 +69,7 @@ def data_sharing_page(): htmlfilelist=htmlfilelist) -@app.route("/search") +@app.route("/search", methods=('POST',)) def search_page(): print("in search_page") if 'info_database' in request.args: -- cgit v1.2.3