Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- IOError: [Errno 2] No such file or directory: 'D:\pcharm\untitled6\db.sql'
- def init_db():
- with app.app_context():
- db = get_db()
- with app.open_resource('db.sql', mode='r') as f:
- db.cursor().executescript(f.read())
- db.commit()
- app.config.update(dict(
- DATABASE=os.path.join(app.root_path, 'flaskr.db'),
- DEBUG=True,
- SECRET_KEY='development key',
- USERNAME='admin',
- PASSWORD='default'))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement