Forza
Forza

Reputation: 1649

Need help setting up Python Flask framework

I've got a XAMPP apache server, Python 2.7 and I've installed setuptools and all the Flask requirements. Still I cannot run setup.py, which generates the following error:

You need to specify DATABASE in settings.py, and ensure that Flask-SQLAlchemy is installed.

Since I've installed Flask alchemy it must be my settings.py or something else. This is the path to my (yet to be created) database.db:

DATABASE = 'C:\xampp\htdocs\maraschino\maraschino.db'

Any help on this would be greatly appreciated!

Upvotes: 2

Views: 655

Answers (1)

Forza
Forza

Reputation: 1649

Problem already solved.

The solution is to change the 'slash' in the database path:

DATABASE = 'C:\xampp\htdocs\maraschino\maraschino.db'

must be:

DATABASE = 'C:/xampp/htdocs/maraschino/maraschino.db'

Result:

'Database sucessfully initialised'

Upvotes: 2

Related Questions