I installed flask-security via pip install flask-security, and it worked fine.
Then I copy-pasted the basic example from the flask-security website here: https://pythonhosted.org/Flask-Security/quickstart.html#id1
It shows the login form, but once I enter the details of the user and hit the login button, pythonAnywhere throws an exception:
Error running WSGI application
NameError: name 'RoleMixin' is not defined
File "/var/www/..._pythonanywhere_com_wsgi.py", line 16, in <module>
from flask_app import app as application
File "/home/.../mysite/flask_app.py", line 29, in <module>
class Role(db.Model, RoleMixin):
Error running WSGI application
NameError: name 'RoleMixin' is not defined
File "/var/www/..._pythonanywhere_com_wsgi.py", line 16, in <module>
from flask_app import app as application
File "/home/.../mysite/flask_app.py", line 29, in <module>
class Role(db.Model, RoleMixin):
Error running WSGI application
RuntimeError: The configuration value `SECURITY_PASSWORD_SALT` must not be None when the value of `SECURITY_PASSWORD_HASH` is set to "bcrypt"
File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1994, in __call__
return self.wsgi_app(environ, start_response)
I've got no clue what goes wrong here, so I would appreciate any help pointing to my mistake.
[edit by admin: formatting]