Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
nopaque
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SFB 1288 - INF
nopaque
Commits
3e8ce1e7
Commit
3e8ce1e7
authored
5 years ago
by
Patrick Jentsch
Browse files
Options
Downloads
Patches
Plain Diff
Add Flask-Mail to app instance.
parent
d6ec00d9
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/__init__.py
+3
-0
3 additions, 0 deletions
app/__init__.py
with
3 additions
and
0 deletions
app/__init__.py
+
3
−
0
View file @
3e8ce1e7
from
config
import
config
from
flask
import
Flask
from
flask_login
import
LoginManager
from
flask_mail
import
Mail
from
flask_sqlalchemy
import
SQLAlchemy
db
=
SQLAlchemy
()
mail
=
Mail
()
login_manager
=
LoginManager
()
login_manager
.
login_view
=
'
auth.login
'
...
...
@@ -17,6 +19,7 @@ def create_app(config_name):
db
.
init_app
(
app
)
login_manager
.
init_app
(
app
)
mail
.
init_app
(
app
)
from
.auth
import
auth
as
auth_blueprint
app
.
register_blueprint
(
auth_blueprint
,
url_prefix
=
'
/auth
'
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment