-
Notifications
You must be signed in to change notification settings - Fork 9
PyCharm Setup Guide
Colin Hunt edited this page Mar 8, 2015
·
3 revisions
-
Install PyCharm Professional Edition (30-day trial, has support for the tools we're using).
-
When it starts, choose
open directory
and select the RIS install directory. Let PyCharm index the files. -
Add the virtualenv we already set up for the project like this.
-
Under
Run > Edit Configurations...
selectrun.py
for the Script. -
Click the run button. You should see something like the following appear in the console.
/Users/colinhunt/env/RIS/bin/python3.4 /Users/colinhunt/projects/RIS/run.py
- Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
- Restarting with stat
1. Check that the app works by navigating to `http://127.0.0.1:5000/` and verifying that you see the homepage.
# Database Tool Setup
1. Click `View > Tool Windows > Database`
1. In the `Database` pane, click `'+' > Data Source > MySQL`
1. Set up the source:
- Give it a name
- Enter `Host`, `Database`, `User`, and `Password` from the `app/config.py` file.
- Let PyCharm auto-generate the url.
- Click the link to install MySQL drivers if needed
- Click `Test Connection` to check the settings are correct
- Click `OK`
1. Database access is now available using the `Database` pane