Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thermondo/django-heroku-connect-sample
Example on how to use Django and Heroku Connect.
https://github.com/thermondo/django-heroku-connect-sample
Last synced: about 1 month ago
JSON representation
Example on how to use Django and Heroku Connect.
- Host: GitHub
- URL: https://github.com/thermondo/django-heroku-connect-sample
- Owner: thermondo
- License: apache-2.0
- Created: 2018-01-08T08:56:53.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-03-02T04:57:16.000Z (almost 2 years ago)
- Last Synced: 2024-04-16T01:57:46.374Z (9 months ago)
- Language: Python
- Size: 65.4 KB
- Stars: 6
- Watchers: 18
- Forks: 5
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Django Heroku Connect Example
### How to Setup
### Before you start
Make sure you have the Heroku CLI setup as well as the Heroku Connect plugin.
```shell
heroku plugins:install heroku-connect-plugin
```You will also need a local copy of the repo on you development machine.
```shell
git clone https://github.com/Thermondo/django-heroku-connect-sample.git
```Last but not least you will obviously need a Salesforce sandbox.
### Deployment
First click the deploy button an create your own app.
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/Thermondo/django-heroku-connect-sample)
Wait until the app is deployed, this should only take a couple seconds.
Set name of your newly created app to your environment to make things simpler:
```bash
export HEROKU_APP_NAME=app_name # please replace with your app name
```#### Configuring Salesforce connection
You can configure a Salesforce connection using the UI:
```bash
heroku addons:open herokuconnect -a "$HEROKU_APP_NAME"
```It will open the Heroku Connect page. Click on Setup and follow the process.
From the command line, run the following command and follow the instructions.
You will be prompted to login to your Salesforce sandbox.```bash
heroku connect:info -a "$HEROKU_APP_NAME"
heroku connect:db:set --schema salesforce --db DATABASE_URL -a "$HEROKU_APP_NAME"
heroku connect:sf:auth -a "$HEROKU_APP_NAME"
sleep 3 # give heroku connect a second to connect
```#### Importing Django Heroku Connect schema
In both cases, from UI or exclusive via terminal, you should import the schema:
```
heroku connect:import schema.json -a "$HEROKU_APP_NAME"
```That's it, enjoy!