WebApp

Check-in [797f77c5d7]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Testing session with quick_session.py
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:797f77c5d72e40448e7b06c459e52f11e978bf0023f11ecf735041cc0c5711b9
User & Date: sebpc 2018-05-24 16:25:39
Context
2018-05-24
16:44
Testing session with simple_webapp.py check-in: e4d4efd593 user: sebpc tags: trunk
16:25
Testing session with quick_session.py check-in: 797f77c5d7 user: sebpc tags: trunk
2018-05-20
18:03
Viewlog updated.Context manager fully implemented check-in: 1fb09ada1a user: sebpc tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Added quick_session.py.



































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from flask import Flask, session

app = Flask(__name__)

app.secret_key = "B@rdz0_trudne_ha$lo"

@app.route('/setuser/<user>')
def setuser(user: str) -> str:
    session['user'] = user
    return 'Zalogowano uzytkownika: ' + session['user']

@app.route('/getuser')
def getuser() -> str:
    return 'Aktualnym uzytkownikiem jest: ' + session['user']

#if __name__ == '__main__':
app.run(debug=True)