Skip to content

Developing with PyCharm

Roey Darwish Dror edited this page Sep 5, 2017 · 1 revision
  1. After getting the code, open the anyway directory in PyCharm.
  2. Set up a virtualenv: File -> Settings -> Project -> Project Interpreter -> Click the cog icon at the top right -> Create VirtualEnv. Name it "anyway" and choose Python 2.7.11 as the base interpreter.
  3. Restart PyCharm, and when it asks whether to install the packages from requirements.txt, answer Yes.
  4. Right click models.py and choose Run 'models', then click the dropdown menu at the top that says models and click Edit Configurations. Under Environment, click the ... next to Environment variables and add the variable DATABASE_URL with the value sqlite:///local.db. Then click OK twice and run models.py again.
  5. Run process.py the same way (adding the DATABASE_URL variable).
  6. Run united.py the same way, but in Edit Configurations, also add --light in the Script parameters.
  7. Run main.py the same way (without --light).
  8. Navigate to http://127.0.0.1:5000 in your browser.