-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathinitial.py
40 lines (25 loc) · 1020 Bytes
/
initial.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import os
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_migrate import Migrate
from flask_mail import Mail
from flask_login import LoginManager
basedir = os.path.abspath(os.path.dirname(__file__))
app = Flask(__name__)
#############################################################################################configurations
app.config['SECRET_KEY']='mykey'
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///'+os.path.join(basedir,'data.sqlite')
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
app.config['MAIL_SERVER']='smtp.gmail.com'
app.config['MAIL_PORT']=465
app.config['MAIL_USERNAME']='[email protected]'
app.config['MAIL_PASSWORD']='sooleinchara'
app.config['MAIL_USE_TLS']=False
app.config['MAIL_USE_SSL']=True
app.config['TESTING']=False
###################################################################################################
db=SQLAlchemy(app)
Migrate(app,db)
mail=Mail(app)
login_manager = LoginManager()
login_manager.init_app(app)