
import logging
log = logging.getLogger(__name__)

from flask import Flask
from flask_uploads import UploadSet, DATA, configure_uploads


app = Flask(__name__, instance_relative_config=True)
app.config.from_object('config')
app.config.from_pyfile('config.py')

with open('local_secret') as fp: # TODO config management
    app.config['SECRET_KEY'] = fp.read().strip()

# flask-security
app.config['SECURITY_PASSWORD_SALT'] = 'salty'

# flask-uploads
app.config['UPLOADS_DEFAULT_DEST'] = './stockdb'
datafiles = UploadSet('datafiles', DATA)
configure_uploads(app, (datafiles,))

from mixmind.database import db, init_db
db.init_app(app)
with app.app_context():
    init_db()

import mixmind.views # to assosciate views with app


import logging
log = logging.getLogger(__name__)

from flask import Flask
from flask_uploads import UploadSet, DATA, configure_uploads


app = Flask(__name__, instance_relative_config=True)
app.config.from_object('config')
app.config.from_pyfile('config.py')

# flask-uploads
app.config['UPLOADS_DEFAULT_DEST'] = './stockdb'
datafiles = UploadSet('datafiles', DATA)
configure_uploads(app, (datafiles,))

from mixmind.database import db, init_db
db.init_app(app)
with app.app_context():
    init_db()

import mixmind.views # to assosciate views with app

Remove other secret lookups from init
Remove other secret lookups from init

  
  import logging
  log = logging.getLogger(__name__)
  
  from flask import Flask
  from flask_uploads import UploadSet, DATA, configure_uploads
  
  
  app = Flask(__name__, instance_relative_config=True)
  app.config.from_object('config')
  app.config.from_pyfile('config.py')
- 
- with open('local_secret') as fp: # TODO config management
-     app.config['SECRET_KEY'] = fp.read().strip()
- 
- # flask-security
- app.config['SECURITY_PASSWORD_SALT'] = 'salty'
  
  # flask-uploads
  app.config['UPLOADS_DEFAULT_DEST'] = './stockdb'
  datafiles = UploadSet('datafiles', DATA)
  configure_uploads(app, (datafiles,))
  
  from mixmind.database import db, init_db
  db.init_app(app)
  with app.app_context():
      init_db()
  
  import mixmind.views # to assosciate views with app
  
Remove other secret lookups from init
## Code Before:

import logging
log = logging.getLogger(__name__)

from flask import Flask
from flask_uploads import UploadSet, DATA, configure_uploads


app = Flask(__name__, instance_relative_config=True)
app.config.from_object('config')
app.config.from_pyfile('config.py')

with open('local_secret') as fp: # TODO config management
    app.config['SECRET_KEY'] = fp.read().strip()

# flask-security
app.config['SECURITY_PASSWORD_SALT'] = 'salty'

# flask-uploads
app.config['UPLOADS_DEFAULT_DEST'] = './stockdb'
datafiles = UploadSet('datafiles', DATA)
configure_uploads(app, (datafiles,))

from mixmind.database import db, init_db
db.init_app(app)
with app.app_context():
    init_db()

import mixmind.views # to assosciate views with app

## Instruction:
Remove other secret lookups from init
## Code After:

import logging
log = logging.getLogger(__name__)

from flask import Flask
from flask_uploads import UploadSet, DATA, configure_uploads


app = Flask(__name__, instance_relative_config=True)
app.config.from_object('config')
app.config.from_pyfile('config.py')

# flask-uploads
app.config['UPLOADS_DEFAULT_DEST'] = './stockdb'
datafiles = UploadSet('datafiles', DATA)
configure_uploads(app, (datafiles,))

from mixmind.database import db, init_db
db.init_app(app)
with app.app_context():
    init_db()

import mixmind.views # to assosciate views with app
