Skip to content

thermondo/django-heroku-connect-sample

Repository files navigation

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.

heroku plugins:install heroku-connect-plugin

You will also need a local copy of the repo on you development machine.

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

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:

export HEROKU_APP_NAME=app_name  # please replace with your app name

Configuring Salesforce connection

You can configure a Salesforce connection using the UI:

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.

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!

About

Example on how to use Django and Heroku Connect.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages