‘active’ is an invalid keyword argument for User
We fix the error TypeError: ‘active’ is an invalid keyword argument for User.
The error looks like:
File “/run.py”, line 2, in
from app import app
File “/app/__init__.py”, line 35, in
from app.admin.routes import admin_bp
File “/app/admin/__init__.py”, line 70, in
from app.forms import LoginForm, RegistrationForm
File “/app/forms.py”, line 27, in
from app.models import User
File “/app/models.py”, line 32, in
class User (db.Model, UserMixin):
File “/app/models.py”, line 47, in User
active
NameError: name ‘active’ is not defined
The error occurs because a column has not been added to the user model active:
active = db.Column(db.Boolean())
This column is required for the module to work. Flask-Security…