Skip to content

PyCharm Setup Guide

Colin Hunt edited this page Mar 8, 2015 · 3 revisions

PyCharm Install

  1. Install PyCharm Professional Edition (30-day trial, has support for the tools we're using).

  2. When it starts, choose open directory and select the RIS install directory. Let PyCharm index the files.

  3. Add the virtualenv we already set up for the project like this.

  4. Under Run > Edit Configurations... select run.py for the Script.

  5. 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

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
Clone this wiki locally