-
Notifications
You must be signed in to change notification settings - Fork 244
Developing with PyCharm
Roey Darwish Dror edited this page Sep 5, 2017
·
1 revision
- After getting the code, open the
anyway
directory in PyCharm. - 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.
- Restart PyCharm, and when it asks whether to install the packages from
requirements.txt
, answer Yes. - Right click
models.py
and choose Run 'models', then click the dropdown menu at the top that saysmodels
and click Edit Configurations. Under Environment, click the...
next to Environment variables and add the variableDATABASE_URL
with the valuesqlite:///local.db
. Then click OK twice and runmodels.py
again. - Run
process.py
the same way (adding theDATABASE_URL
variable). - Run
united.py
the same way, but in Edit Configurations, also add--light
in the Script parameters. - Run
main.py
the same way (without--light
). - Navigate to http://127.0.0.1:5000 in your browser.