flask-extensions

How to track the current user in flask-login?

How to track the current user in flask-login? Question: I m trying to use the current user in my view from flask-login. So i tried to g object I m assigning flask.ext.login.current_user to g object @pot.before_request def load_users(): g.user = current_user.username It works if the user is correct. But when i do sign-up or login …

Total answers: 4

How to stop flask application without using ctrl-c

How to stop flask application without using ctrl-c Question: I want to implement a command which can stop flask application by using flask-script. I have searched the solution for a while. Because the framework doesn’t provide app.stop() API, I am curious about how to code this. I am working on Ubuntu 12.10 and Python 2.7.3. …

Total answers: 19