AttributeError: 'dict' object has no attribute 'is_active' (PyMongo And Flask)












1















@app.route("/register", methods=['GET', 'POST'])
def register():
form = RegistrationForm()
if form.validate_on_submit():
users = mongo.db.users
hash_password=bcrypt.generate_password_hash(form.password.data).decode('utf-8')
eml=form.email.data
gen=form.gender.data
ctry=form.country.data
profile={'name' : form.username.data, 'password' :hash_password,'email':eml,'gender':gen,'country':ctry}
users.insert(profile)
#users.insert({'name' : form.username.data, 'password' :form.password.data})
flash(f'Your has been Account created for Username {form.username.data}!, You can login', 'success')
return redirect(url_for('login'))
#return redirect(url_for('home'))
return render_template('register.html', title='Register', form=form)

@app.route("/login", methods=['GET', 'POST'])
def login():
form = LoginForm()
if form.validate_on_submit():
users = mongo.db.users
loginuser = users.find_one({'email' : form.email.data})
if loginuser and bcrypt.check_password_hash(loginuser['password'],form.password.data):
#if form.email.data == 'admin@blog.com' and form.password.data == 'password':
login_user(loginuser,remember=form.data.remember)
return redirect(url_for('home'))
#flash('You have been logged in!', 'success')
#return redirect(url_for('home'))
else:
flash('Login Unsuccessful. Please check username and password', 'danger')
return render_template('login.html', title='Login', form=form)


I have created a simple register and login method using flask with combination of pymongo.
Now for user session management i am using flask_login
but it gives me this error
AttributeError: 'dict' object has no attribute 'is_active'



the solution that i found different post was to add UserMaxIn in UserClass
but i dont have any class for User Model and i dont want to make it either



what would be the solution of this error ?










share|improve this question



























    1















    @app.route("/register", methods=['GET', 'POST'])
    def register():
    form = RegistrationForm()
    if form.validate_on_submit():
    users = mongo.db.users
    hash_password=bcrypt.generate_password_hash(form.password.data).decode('utf-8')
    eml=form.email.data
    gen=form.gender.data
    ctry=form.country.data
    profile={'name' : form.username.data, 'password' :hash_password,'email':eml,'gender':gen,'country':ctry}
    users.insert(profile)
    #users.insert({'name' : form.username.data, 'password' :form.password.data})
    flash(f'Your has been Account created for Username {form.username.data}!, You can login', 'success')
    return redirect(url_for('login'))
    #return redirect(url_for('home'))
    return render_template('register.html', title='Register', form=form)

    @app.route("/login", methods=['GET', 'POST'])
    def login():
    form = LoginForm()
    if form.validate_on_submit():
    users = mongo.db.users
    loginuser = users.find_one({'email' : form.email.data})
    if loginuser and bcrypt.check_password_hash(loginuser['password'],form.password.data):
    #if form.email.data == 'admin@blog.com' and form.password.data == 'password':
    login_user(loginuser,remember=form.data.remember)
    return redirect(url_for('home'))
    #flash('You have been logged in!', 'success')
    #return redirect(url_for('home'))
    else:
    flash('Login Unsuccessful. Please check username and password', 'danger')
    return render_template('login.html', title='Login', form=form)


    I have created a simple register and login method using flask with combination of pymongo.
    Now for user session management i am using flask_login
    but it gives me this error
    AttributeError: 'dict' object has no attribute 'is_active'



    the solution that i found different post was to add UserMaxIn in UserClass
    but i dont have any class for User Model and i dont want to make it either



    what would be the solution of this error ?










    share|improve this question

























      1












      1








      1








      @app.route("/register", methods=['GET', 'POST'])
      def register():
      form = RegistrationForm()
      if form.validate_on_submit():
      users = mongo.db.users
      hash_password=bcrypt.generate_password_hash(form.password.data).decode('utf-8')
      eml=form.email.data
      gen=form.gender.data
      ctry=form.country.data
      profile={'name' : form.username.data, 'password' :hash_password,'email':eml,'gender':gen,'country':ctry}
      users.insert(profile)
      #users.insert({'name' : form.username.data, 'password' :form.password.data})
      flash(f'Your has been Account created for Username {form.username.data}!, You can login', 'success')
      return redirect(url_for('login'))
      #return redirect(url_for('home'))
      return render_template('register.html', title='Register', form=form)

      @app.route("/login", methods=['GET', 'POST'])
      def login():
      form = LoginForm()
      if form.validate_on_submit():
      users = mongo.db.users
      loginuser = users.find_one({'email' : form.email.data})
      if loginuser and bcrypt.check_password_hash(loginuser['password'],form.password.data):
      #if form.email.data == 'admin@blog.com' and form.password.data == 'password':
      login_user(loginuser,remember=form.data.remember)
      return redirect(url_for('home'))
      #flash('You have been logged in!', 'success')
      #return redirect(url_for('home'))
      else:
      flash('Login Unsuccessful. Please check username and password', 'danger')
      return render_template('login.html', title='Login', form=form)


      I have created a simple register and login method using flask with combination of pymongo.
      Now for user session management i am using flask_login
      but it gives me this error
      AttributeError: 'dict' object has no attribute 'is_active'



      the solution that i found different post was to add UserMaxIn in UserClass
      but i dont have any class for User Model and i dont want to make it either



      what would be the solution of this error ?










      share|improve this question














      @app.route("/register", methods=['GET', 'POST'])
      def register():
      form = RegistrationForm()
      if form.validate_on_submit():
      users = mongo.db.users
      hash_password=bcrypt.generate_password_hash(form.password.data).decode('utf-8')
      eml=form.email.data
      gen=form.gender.data
      ctry=form.country.data
      profile={'name' : form.username.data, 'password' :hash_password,'email':eml,'gender':gen,'country':ctry}
      users.insert(profile)
      #users.insert({'name' : form.username.data, 'password' :form.password.data})
      flash(f'Your has been Account created for Username {form.username.data}!, You can login', 'success')
      return redirect(url_for('login'))
      #return redirect(url_for('home'))
      return render_template('register.html', title='Register', form=form)

      @app.route("/login", methods=['GET', 'POST'])
      def login():
      form = LoginForm()
      if form.validate_on_submit():
      users = mongo.db.users
      loginuser = users.find_one({'email' : form.email.data})
      if loginuser and bcrypt.check_password_hash(loginuser['password'],form.password.data):
      #if form.email.data == 'admin@blog.com' and form.password.data == 'password':
      login_user(loginuser,remember=form.data.remember)
      return redirect(url_for('home'))
      #flash('You have been logged in!', 'success')
      #return redirect(url_for('home'))
      else:
      flash('Login Unsuccessful. Please check username and password', 'danger')
      return render_template('login.html', title='Login', form=form)


      I have created a simple register and login method using flask with combination of pymongo.
      Now for user session management i am using flask_login
      but it gives me this error
      AttributeError: 'dict' object has no attribute 'is_active'



      the solution that i found different post was to add UserMaxIn in UserClass
      but i dont have any class for User Model and i dont want to make it either



      what would be the solution of this error ?







      python flask pymongo flask-login






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 20 '18 at 21:40









      Usman RafiqUsman Rafiq

      85




      85
























          1 Answer
          1






          active

          oldest

          votes


















          0














          Flask-Login requires that you use a class to represent users, not a raw dict.



          As described in documentation, this class needs to implement some properties and methods, included the is_active() method.



          The UserMixin class is the base class that provides default implementations for all the required properties and methods and you can extend it and create a simple User class.





          Update: added example



          Based on what you already have, the simplest thing you can do is:




          • create a custom User class that extends UserMixin

          • store the json object from MongoDB inside the User class

          • override the methods for which you require a behavior different from the default one

          • In the /login route create an instance of the User class and pass it to flask_login.login_user()


          User class



          class User(UserMixin):
          def __init__(self, user_json):
          self.user_json = user_json

          # Overriding get_id is required if you don't have the id property
          # Check the source code for UserMixin for details
          def get_id(self):
          object_id = self.user_json.get('_id')
          return str(object_id)


          For all the methods/properties (is_authenticated, is_active, is_anonymous), except get_id it uses the default implementations. If you don't need the default implementations you don't need to extend UserMixin but you have to implement all the methods by yourself.



          Usage of the User class in login route



          @app.route("/login", methods=['GET', 'POST'])
          def login():
          form = LoginForm()
          if form.validate_on_submit():
          users = mongo.db.users
          loginuser_json = users.find_one({'email': form.email.data})
          if loginuser_json and bcrypt.check_password_hash(loginuser_json['password'], form.password.data):
          # Create a custom user and pass it to login_user:
          loginuser = User(loginuser_json)
          login_user(loginuser, remember=form.data.remember)
          return redirect(url_for('home'))
          else:
          flash('Login Unsuccessful. Please check username and password', 'danger')
          return render_template('login.html', title='Login', form=form)


          Remember that you also have to provide a user_loader as described here. For example, given the user_id, perform a query on MongoDB and return the User object:



          @login_manager.user_loader
          def load_user(user_id):
          users = mongo.db.users
          user_json = users.find_one({'_id': ObjectId(user_id)})
          return User(user_json)


          Useful links




          • Flask-Login documentation


          • UserMixin source code

          • A more complete User class






          share|improve this answer


























          • Can you give me a simple code for creating User class ? and how to call that class in login route

            – Usman Rafiq
            Nov 21 '18 at 8:06











          • @UsmanRafiq I updated the answer with an example

            – vinsce
            Nov 21 '18 at 12:06













          • Thanks Alot , Its working By the way how to get current user email ?

            – Usman Rafiq
            Nov 21 '18 at 12:55











          • You can get it from the json object: loginuser_json.get('email'). If you want to get it from a User object: user_object.user_json.get('email') or you can add a new method get_email inside the User class.

            – vinsce
            Nov 21 '18 at 13:05













          • def get_mail(self): object_id = self.user_json.get('email') return str(object_id) like this ?

            – Usman Rafiq
            Nov 21 '18 at 13:13













          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53401996%2fattributeerror-dict-object-has-no-attribute-is-active-pymongo-and-flask%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          Flask-Login requires that you use a class to represent users, not a raw dict.



          As described in documentation, this class needs to implement some properties and methods, included the is_active() method.



          The UserMixin class is the base class that provides default implementations for all the required properties and methods and you can extend it and create a simple User class.





          Update: added example



          Based on what you already have, the simplest thing you can do is:




          • create a custom User class that extends UserMixin

          • store the json object from MongoDB inside the User class

          • override the methods for which you require a behavior different from the default one

          • In the /login route create an instance of the User class and pass it to flask_login.login_user()


          User class



          class User(UserMixin):
          def __init__(self, user_json):
          self.user_json = user_json

          # Overriding get_id is required if you don't have the id property
          # Check the source code for UserMixin for details
          def get_id(self):
          object_id = self.user_json.get('_id')
          return str(object_id)


          For all the methods/properties (is_authenticated, is_active, is_anonymous), except get_id it uses the default implementations. If you don't need the default implementations you don't need to extend UserMixin but you have to implement all the methods by yourself.



          Usage of the User class in login route



          @app.route("/login", methods=['GET', 'POST'])
          def login():
          form = LoginForm()
          if form.validate_on_submit():
          users = mongo.db.users
          loginuser_json = users.find_one({'email': form.email.data})
          if loginuser_json and bcrypt.check_password_hash(loginuser_json['password'], form.password.data):
          # Create a custom user and pass it to login_user:
          loginuser = User(loginuser_json)
          login_user(loginuser, remember=form.data.remember)
          return redirect(url_for('home'))
          else:
          flash('Login Unsuccessful. Please check username and password', 'danger')
          return render_template('login.html', title='Login', form=form)


          Remember that you also have to provide a user_loader as described here. For example, given the user_id, perform a query on MongoDB and return the User object:



          @login_manager.user_loader
          def load_user(user_id):
          users = mongo.db.users
          user_json = users.find_one({'_id': ObjectId(user_id)})
          return User(user_json)


          Useful links




          • Flask-Login documentation


          • UserMixin source code

          • A more complete User class






          share|improve this answer


























          • Can you give me a simple code for creating User class ? and how to call that class in login route

            – Usman Rafiq
            Nov 21 '18 at 8:06











          • @UsmanRafiq I updated the answer with an example

            – vinsce
            Nov 21 '18 at 12:06













          • Thanks Alot , Its working By the way how to get current user email ?

            – Usman Rafiq
            Nov 21 '18 at 12:55











          • You can get it from the json object: loginuser_json.get('email'). If you want to get it from a User object: user_object.user_json.get('email') or you can add a new method get_email inside the User class.

            – vinsce
            Nov 21 '18 at 13:05













          • def get_mail(self): object_id = self.user_json.get('email') return str(object_id) like this ?

            – Usman Rafiq
            Nov 21 '18 at 13:13


















          0














          Flask-Login requires that you use a class to represent users, not a raw dict.



          As described in documentation, this class needs to implement some properties and methods, included the is_active() method.



          The UserMixin class is the base class that provides default implementations for all the required properties and methods and you can extend it and create a simple User class.





          Update: added example



          Based on what you already have, the simplest thing you can do is:




          • create a custom User class that extends UserMixin

          • store the json object from MongoDB inside the User class

          • override the methods for which you require a behavior different from the default one

          • In the /login route create an instance of the User class and pass it to flask_login.login_user()


          User class



          class User(UserMixin):
          def __init__(self, user_json):
          self.user_json = user_json

          # Overriding get_id is required if you don't have the id property
          # Check the source code for UserMixin for details
          def get_id(self):
          object_id = self.user_json.get('_id')
          return str(object_id)


          For all the methods/properties (is_authenticated, is_active, is_anonymous), except get_id it uses the default implementations. If you don't need the default implementations you don't need to extend UserMixin but you have to implement all the methods by yourself.



          Usage of the User class in login route



          @app.route("/login", methods=['GET', 'POST'])
          def login():
          form = LoginForm()
          if form.validate_on_submit():
          users = mongo.db.users
          loginuser_json = users.find_one({'email': form.email.data})
          if loginuser_json and bcrypt.check_password_hash(loginuser_json['password'], form.password.data):
          # Create a custom user and pass it to login_user:
          loginuser = User(loginuser_json)
          login_user(loginuser, remember=form.data.remember)
          return redirect(url_for('home'))
          else:
          flash('Login Unsuccessful. Please check username and password', 'danger')
          return render_template('login.html', title='Login', form=form)


          Remember that you also have to provide a user_loader as described here. For example, given the user_id, perform a query on MongoDB and return the User object:



          @login_manager.user_loader
          def load_user(user_id):
          users = mongo.db.users
          user_json = users.find_one({'_id': ObjectId(user_id)})
          return User(user_json)


          Useful links




          • Flask-Login documentation


          • UserMixin source code

          • A more complete User class






          share|improve this answer


























          • Can you give me a simple code for creating User class ? and how to call that class in login route

            – Usman Rafiq
            Nov 21 '18 at 8:06











          • @UsmanRafiq I updated the answer with an example

            – vinsce
            Nov 21 '18 at 12:06













          • Thanks Alot , Its working By the way how to get current user email ?

            – Usman Rafiq
            Nov 21 '18 at 12:55











          • You can get it from the json object: loginuser_json.get('email'). If you want to get it from a User object: user_object.user_json.get('email') or you can add a new method get_email inside the User class.

            – vinsce
            Nov 21 '18 at 13:05













          • def get_mail(self): object_id = self.user_json.get('email') return str(object_id) like this ?

            – Usman Rafiq
            Nov 21 '18 at 13:13
















          0












          0








          0







          Flask-Login requires that you use a class to represent users, not a raw dict.



          As described in documentation, this class needs to implement some properties and methods, included the is_active() method.



          The UserMixin class is the base class that provides default implementations for all the required properties and methods and you can extend it and create a simple User class.





          Update: added example



          Based on what you already have, the simplest thing you can do is:




          • create a custom User class that extends UserMixin

          • store the json object from MongoDB inside the User class

          • override the methods for which you require a behavior different from the default one

          • In the /login route create an instance of the User class and pass it to flask_login.login_user()


          User class



          class User(UserMixin):
          def __init__(self, user_json):
          self.user_json = user_json

          # Overriding get_id is required if you don't have the id property
          # Check the source code for UserMixin for details
          def get_id(self):
          object_id = self.user_json.get('_id')
          return str(object_id)


          For all the methods/properties (is_authenticated, is_active, is_anonymous), except get_id it uses the default implementations. If you don't need the default implementations you don't need to extend UserMixin but you have to implement all the methods by yourself.



          Usage of the User class in login route



          @app.route("/login", methods=['GET', 'POST'])
          def login():
          form = LoginForm()
          if form.validate_on_submit():
          users = mongo.db.users
          loginuser_json = users.find_one({'email': form.email.data})
          if loginuser_json and bcrypt.check_password_hash(loginuser_json['password'], form.password.data):
          # Create a custom user and pass it to login_user:
          loginuser = User(loginuser_json)
          login_user(loginuser, remember=form.data.remember)
          return redirect(url_for('home'))
          else:
          flash('Login Unsuccessful. Please check username and password', 'danger')
          return render_template('login.html', title='Login', form=form)


          Remember that you also have to provide a user_loader as described here. For example, given the user_id, perform a query on MongoDB and return the User object:



          @login_manager.user_loader
          def load_user(user_id):
          users = mongo.db.users
          user_json = users.find_one({'_id': ObjectId(user_id)})
          return User(user_json)


          Useful links




          • Flask-Login documentation


          • UserMixin source code

          • A more complete User class






          share|improve this answer















          Flask-Login requires that you use a class to represent users, not a raw dict.



          As described in documentation, this class needs to implement some properties and methods, included the is_active() method.



          The UserMixin class is the base class that provides default implementations for all the required properties and methods and you can extend it and create a simple User class.





          Update: added example



          Based on what you already have, the simplest thing you can do is:




          • create a custom User class that extends UserMixin

          • store the json object from MongoDB inside the User class

          • override the methods for which you require a behavior different from the default one

          • In the /login route create an instance of the User class and pass it to flask_login.login_user()


          User class



          class User(UserMixin):
          def __init__(self, user_json):
          self.user_json = user_json

          # Overriding get_id is required if you don't have the id property
          # Check the source code for UserMixin for details
          def get_id(self):
          object_id = self.user_json.get('_id')
          return str(object_id)


          For all the methods/properties (is_authenticated, is_active, is_anonymous), except get_id it uses the default implementations. If you don't need the default implementations you don't need to extend UserMixin but you have to implement all the methods by yourself.



          Usage of the User class in login route



          @app.route("/login", methods=['GET', 'POST'])
          def login():
          form = LoginForm()
          if form.validate_on_submit():
          users = mongo.db.users
          loginuser_json = users.find_one({'email': form.email.data})
          if loginuser_json and bcrypt.check_password_hash(loginuser_json['password'], form.password.data):
          # Create a custom user and pass it to login_user:
          loginuser = User(loginuser_json)
          login_user(loginuser, remember=form.data.remember)
          return redirect(url_for('home'))
          else:
          flash('Login Unsuccessful. Please check username and password', 'danger')
          return render_template('login.html', title='Login', form=form)


          Remember that you also have to provide a user_loader as described here. For example, given the user_id, perform a query on MongoDB and return the User object:



          @login_manager.user_loader
          def load_user(user_id):
          users = mongo.db.users
          user_json = users.find_one({'_id': ObjectId(user_id)})
          return User(user_json)


          Useful links




          • Flask-Login documentation


          • UserMixin source code

          • A more complete User class







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 21 '18 at 11:40

























          answered Nov 20 '18 at 22:42









          vinscevinsce

          14511




          14511













          • Can you give me a simple code for creating User class ? and how to call that class in login route

            – Usman Rafiq
            Nov 21 '18 at 8:06











          • @UsmanRafiq I updated the answer with an example

            – vinsce
            Nov 21 '18 at 12:06













          • Thanks Alot , Its working By the way how to get current user email ?

            – Usman Rafiq
            Nov 21 '18 at 12:55











          • You can get it from the json object: loginuser_json.get('email'). If you want to get it from a User object: user_object.user_json.get('email') or you can add a new method get_email inside the User class.

            – vinsce
            Nov 21 '18 at 13:05













          • def get_mail(self): object_id = self.user_json.get('email') return str(object_id) like this ?

            – Usman Rafiq
            Nov 21 '18 at 13:13





















          • Can you give me a simple code for creating User class ? and how to call that class in login route

            – Usman Rafiq
            Nov 21 '18 at 8:06











          • @UsmanRafiq I updated the answer with an example

            – vinsce
            Nov 21 '18 at 12:06













          • Thanks Alot , Its working By the way how to get current user email ?

            – Usman Rafiq
            Nov 21 '18 at 12:55











          • You can get it from the json object: loginuser_json.get('email'). If you want to get it from a User object: user_object.user_json.get('email') or you can add a new method get_email inside the User class.

            – vinsce
            Nov 21 '18 at 13:05













          • def get_mail(self): object_id = self.user_json.get('email') return str(object_id) like this ?

            – Usman Rafiq
            Nov 21 '18 at 13:13



















          Can you give me a simple code for creating User class ? and how to call that class in login route

          – Usman Rafiq
          Nov 21 '18 at 8:06





          Can you give me a simple code for creating User class ? and how to call that class in login route

          – Usman Rafiq
          Nov 21 '18 at 8:06













          @UsmanRafiq I updated the answer with an example

          – vinsce
          Nov 21 '18 at 12:06







          @UsmanRafiq I updated the answer with an example

          – vinsce
          Nov 21 '18 at 12:06















          Thanks Alot , Its working By the way how to get current user email ?

          – Usman Rafiq
          Nov 21 '18 at 12:55





          Thanks Alot , Its working By the way how to get current user email ?

          – Usman Rafiq
          Nov 21 '18 at 12:55













          You can get it from the json object: loginuser_json.get('email'). If you want to get it from a User object: user_object.user_json.get('email') or you can add a new method get_email inside the User class.

          – vinsce
          Nov 21 '18 at 13:05







          You can get it from the json object: loginuser_json.get('email'). If you want to get it from a User object: user_object.user_json.get('email') or you can add a new method get_email inside the User class.

          – vinsce
          Nov 21 '18 at 13:05















          def get_mail(self): object_id = self.user_json.get('email') return str(object_id) like this ?

          – Usman Rafiq
          Nov 21 '18 at 13:13







          def get_mail(self): object_id = self.user_json.get('email') return str(object_id) like this ?

          – Usman Rafiq
          Nov 21 '18 at 13:13






















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53401996%2fattributeerror-dict-object-has-no-attribute-is-active-pymongo-and-flask%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          android studio warns about leanback feature tag usage required on manifest while using Unity exported app?

          SQL update select statement

          'app-layout' is not a known element: how to share Component with different Modules