Advertisement
Guest User

Untitled

a guest
May 21st, 2016
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. IOError: [Errno 2] No such file or directory: 'D:\pcharm\untitled6\db.sql'
  2.  
  3. def init_db():
  4. with app.app_context():
  5. db = get_db()
  6. with app.open_resource('db.sql', mode='r') as f:
  7. db.cursor().executescript(f.read())
  8. db.commit()
  9.  
  10. app.config.update(dict(
  11. DATABASE=os.path.join(app.root_path, 'flaskr.db'),
  12. DEBUG=True,
  13. SECRET_KEY='development key',
  14. USERNAME='admin',
  15. PASSWORD='default'))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement