These are chat archives for pythonvietnam/Flask

1st
Feb 2017
suvrat-joshi
@suvrat-joshi
Feb 01 2017 13:04

Hello everyone, I have built a webapp using flask, and I need to store a class object in session so that is is managed for individual users, how can i do this ?

for e.g.

@app.route(‘/login’, methods=[‘POST’])
def login(email, password):
        session[‘a’] = abc(‘dsad’)

@app.route(‘/logout’)
def logout():
       x = session[‘a’]
Italo Maia
@imaia
Feb 01 2017 13:31
@suvrat-joshi what about storing primitives in the session? Then loading those in your "manager"
Hey folks, how do you generate forms from your marshmallow schemas?
suvrat-joshi
@suvrat-joshi
Feb 01 2017 13:52
@imaia could you provide me with some examples ?
Italo Maia
@imaia
Feb 01 2017 14:30
session['user_conf'] = dict(age=10)
?
Paul Aranguren
@Van_Guren_twitter
Feb 01 2017 15:59
How long did it take you guys to become employable when you started learning Flask?
Italo Maia
@imaia
Feb 01 2017 18:24
@Van_Guren_twitter one should also consider python and web development
Paul Aranguren
@Van_Guren_twitter
Feb 01 2017 18:49
@imaia Italo, I'm sorry, I don't understand what you mean
Italo Maia
@imaia
Feb 01 2017 20:38
@Van_Guren_twitter if you're already able to deliver, you're employable
that takes more or less time depending on your background
Paul Aranguren
@Van_Guren_twitter
Feb 01 2017 20:46
Right, I understand now
Makes sense
malvin9000
@malvin9000
Feb 01 2017 23:12
I would highly suggest you check out Grinberg's book if you haven't already. Work through that a few times and you'll be on your way, as long as you just keep trying to build stuff and learn.