[Flask] Issues with Flash_session - Cannot add dict item ..

Ben Duncan linux4ms at gmail.com
Tue Sep 24 11:14:50 EDT 2019

Ok, am i missing something ?


from flask import Flask, render_template, request, redirect, url_for,
flash, make_response, escape, g
from flask_session import Session
from flask_sqlalchemy import SQLAlchemy
from flask import session

app = Flask(__name__)
print 'APP is : ', app
csrf = CSRFProtect(app)

session = Session()

When I try to do something like this:

session['modified'] = False

I get :

   - e
   line *1935*, in dispatch_request

   return self.view_functions[rule.endpoint](**req.view_args)

   - File "/data/flask/applications/myproject/wtform.py", line *334*, in

   session['modified'] = False

TypeError: 'Session' object does not support item assignment

What Am I doing wrong .... ?

*Ben Duncan*
DBA / Chief Software Architect
Mississippi State Supreme Court
Electronic Filing Division
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/flask/attachments/20190924/8b682927/attachment.html>

More information about the Flask mailing list