Skip to content

Commit

Permalink
install and configure Flask-Bcrypt==0.7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
mahenzon committed Jan 10, 2021
1 parent b9d23b3 commit 9f28b77
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
5 changes: 5 additions & 0 deletions blog/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from flask import Flask, render_template
from flask_migrate import Migrate

from blog.security import flask_bcrypt
from blog.views.auth import login_manager, auth_app
from blog.views.users import users_app
from blog.views.articles import articles_app
Expand All @@ -12,6 +13,10 @@
app = Flask(__name__)
app.config.from_object(f"blog.configs.{cfg_name}")

# security
flask_bcrypt.init_app(app)


# views
app.register_blueprint(auth_app, url_prefix="/auth")
app.register_blueprint(users_app, url_prefix="/users")
Expand Down
7 changes: 7 additions & 0 deletions blog/security.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from flask_bcrypt import Bcrypt

flask_bcrypt = Bcrypt()

__all__ = [
"flask_bcrypt",
]
4 changes: 4 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
alembic==1.4.3
bcrypt==3.2.0
cffi==1.14.4
click==7.1.2
Flask==1.1.2
Flask-Bcrypt==0.7.1
Flask-Login==0.5.0
Flask-Migrate==2.5.3
Flask-SQLAlchemy==2.4.4
Expand All @@ -9,6 +12,7 @@ Jinja2==2.11.2
Mako==1.1.3
MarkupSafe==1.1.1
psycopg2==2.8.6
pycparser==2.20
python-dateutil==2.8.1
python-editor==1.0.4
six==1.15.0
Expand Down

0 comments on commit 9f28b77

Please sign in to comment.