Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


session is saved before @after_request callbacks #351

matejcik opened this Issue · 0 comments

2 participants


This makes it impossible to add data to session in said callbacks. For example, the following code does not work, because session is never stored:

def before_request():
    u = session.get('user')
    g.user = u and db.User(u) or None

def after_request(response):
    session['user'] = g.user and dict(g.user) or None
    return response
@mitsuhiko mitsuhiko closed this in d628df6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.