diff options
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/wqflask/model.py | 3 | ||||
-rw-r--r-- | wqflask/wqflask/user_manager.py | 6 | ||||
-rw-r--r-- | wqflask/wqflask/views.py | 2 |
3 files changed, 8 insertions, 3 deletions
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: |