diff options
author | Sam | 2013-06-21 21:33:01 +0000 |
---|---|---|
committer | Sam | 2013-06-21 21:33:01 +0000 |
commit | a9960c6e0b99e3641d309d22af9f1be77d738c3f (patch) | |
tree | b2a1b7fe8ca80ab9f0f85b95c8203d03a1df47b0 | |
parent | eb178fd3cf246f8b9f71285280bee4f843e0d6ab (diff) | |
download | genenetwork2-a9960c6e0b99e3641d309d22af9f1be77d738c3f.tar.gz |
Added a thank you for siging in message
Fixed issues where homepage was reloaded in modal after siging in
-rw-r--r-- | wqflask/cfg/default_settings.py | 2 | ||||
-rw-r--r-- | wqflask/wqflask/static/new/javascript/login.coffee | 4 | ||||
-rw-r--r-- | wqflask/wqflask/static/new/javascript/login.js | 3 | ||||
-rw-r--r-- | wqflask/wqflask/templates/security/thank_you.html | 6 | ||||
-rw-r--r-- | wqflask/wqflask/views.py | 10 |
5 files changed, 20 insertions, 5 deletions
diff --git a/wqflask/cfg/default_settings.py b/wqflask/cfg/default_settings.py index 96f7f1a5..e638a9c0 100644 --- a/wqflask/cfg/default_settings.py +++ b/wqflask/cfg/default_settings.py @@ -13,3 +13,5 @@ SECURITY_REGISTERABLE = True SECURITY_RECOVERABLE = True SECURITY_EMAIL_SENDER = "no-reply@genenetwork.org" + +SECURITY_POST_LOGIN_VIEW = "/thank_you" diff --git a/wqflask/wqflask/static/new/javascript/login.coffee b/wqflask/wqflask/static/new/javascript/login.coffee index 95e2b5c7..15dafd9a 100644 --- a/wqflask/wqflask/static/new/javascript/login.coffee +++ b/wqflask/wqflask/static/new/javascript/login.coffee @@ -13,8 +13,8 @@ $ -> - - $(document).on("click", ".modalize", modalize) + $(document).one("click", ".modalize", modalize) + console.log("Modalized click!!!") form_success = (data) -> $.colorbox( diff --git a/wqflask/wqflask/static/new/javascript/login.js b/wqflask/wqflask/static/new/javascript/login.js index d51a0ac8..ce301353 100644 --- a/wqflask/wqflask/static/new/javascript/login.js +++ b/wqflask/wqflask/static/new/javascript/login.js @@ -14,7 +14,8 @@ } }); }; - $(document).on("click", ".modalize", modalize); + $(document).one("click", ".modalize", modalize); + console.log("Modalized click!!!"); form_success = function(data) { return $.colorbox({ open: true, diff --git a/wqflask/wqflask/templates/security/thank_you.html b/wqflask/wqflask/templates/security/thank_you.html new file mode 100644 index 00000000..f2e2db68 --- /dev/null +++ b/wqflask/wqflask/templates/security/thank_you.html @@ -0,0 +1,6 @@ +{% from "security/_macros.html" import render_only_errors %} +{% include "security/_messages.html" %} + +<div class="security_box"> + <h4>Thank you for signing in!</h4> +</div> diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py index b9aa3acf..90be7a71 100644 --- a/wqflask/wqflask/views.py +++ b/wqflask/wqflask/views.py @@ -87,7 +87,7 @@ def search_page(): print("key is:", pf(key)) with Bench("Loading cache"): result = Redis.get(key) - + if result: print("Cache hit!!!") with Bench("Loading results"): @@ -97,7 +97,7 @@ def search_page(): print("request.args is", request.args) the_search = search_results.SearchResultPage(request.args) result = the_search.__dict__ - + print("result: ", pf(result)) Redis.set(key, pickle.dumps(result)) Redis.expire(key, 60*60) @@ -249,11 +249,17 @@ def sharing_info_page(): return template_vars +# Take this out or secure it before going into production @app.route("/get_temp_data") def get_temp_data(): temp_uuid = request.args['key'] return flask.jsonify(temp_data.TempData(temp_uuid).get_all()) + +@app.route("/thank_you") +def thank_you(): + return render_template("security/thank_you.html") + @app.route("/manage/users") def manage_users(): template_vars = user_manager.UsersManager() |