-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
I had installed Flask-BasicAuth use:
sudo pip install Flask-BasicAuth
My code looks like this:
from flask import Flask, render_template
from flask_basicauth import BasicAuth
app = Flask(__name__)
app.config['BASIC_AUTH_USERNAME'] = 'john'
app.config['BASIC_AUTH_PASSWORD'] = 'matrix'
app.config['BASIC_AUTH_FORCE'] = True
basic_auth = BasicAuth(app)
@app.route('/')
@basic_auth.required
def secret_view():
return render_template('404.html')
if __name__ == '__main__':
app.run(host='0.0.0.0', port=3000)
But when I run it, The error is.
Traceback (most recent call last):
File "run.py", line 2, in <module>
from flask_basicauth import BasicAuth
ImportError: No module named flask_basicauth
Metadata
Metadata
Assignees
Labels
No labels