Returns the username of the currently logged-in user. Returns: A username as a string or None if there is no logged-in user.
()
| 146 | |
| 147 | |
| 148 | def get_username(): |
| 149 | """Returns the username of the currently logged-in user. |
| 150 | |
| 151 | Returns: |
| 152 | A username as a string or None if there is no logged-in user. |
| 153 | """ |
| 154 | return flask.session.get('username') |