Example #1
0
)


app = Flask(__name__)

app.config["DEBUG"] = False
app.config["SECRET_KEY"] = secret_key

# MongoDB Config
app.config["MONGODB_DB"] = mongo_db
app.config["MONGODB_HOST"] = mongo_host
app.config["MONGODB_PORT"] = mongo_port

# Security Features
app.config["SECURITY_REGISTERABLE"] = user_enable_registration
app.config["SECURITY_TRACKABLE"] = user_enable_tracking
app.config["SECURITY_EMAIL_SENDER"] = user_from_email
app.config["SECURITY_PASSWORD_HASH"] = pwhash
app.config["SECURITY_PASSWORD_SALT"] = salt
app.config["SECURITY_CONFIRMABLE"] = True
app.config["SECURITY_EMAIL_SUBJECT_REGISTER"] = user_register_email_subject

# Email
app.config["MAIL_SERVER"] = mail_url
app.config["DEBUG"] = False
app.config["MAIL_PORT"] = mail_port
app.config["MAIL_USE_SSL"] = mail_SSL
app.config["MAIL_USE_TLS"] = mail_TLS
app.config["MAIL_USERNAME"] = mail_user
app.config["MAIL_PASSWORD"] = mail_pass
app.config["MAIL_SUPPRESS_SEND"] = False
Example #2
0

def releaseConn(conn):
    print "releasing Conn:", conn
    POOL.put(conn)
    return


app = Flask(__name__, static_url_path="")
app.debug = True
# app.debug = False
app.config["SECRET_KEY"] = "secret!"
app.config["DEBUG"] = True
app.config["SQLALCHEMY_DATABASE_URI"] = "sqlite:///wv.db"

app.config["SECURITY_TRACKABLE"] = True
app.config["SECURITY_REGISTERABLE"] = True
app.config["SECURITY_EMAIL_SENDER"] = "no-reply@pollywss.paldeploy.com"

app.config["MAIL_SERVER"] = "192.168.20.18"
app.config["MAIL_PORT"] = 25
# app.config['MAIL_USE_SSL'] = True
app.config["MAIL_USE_SSL"] = False
app.config["MAIL_USERNAME"] = "flycam"
app.config["MAIL_PASSWORD"] = "flyspec"
mail = Mail(app)

socketio = SocketIO(app)

"""
# Create database connection object