diff --git a/.gitignore b/.gitignore index 7fc83fd..4750396 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ venv *.pyc -staticfiles \ No newline at end of file +staticfiles +.idea/ \ No newline at end of file diff --git a/README.md b/README.md index 923c68f..0f5b917 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,37 @@ Django application for listing all Metadata for a Salesforce Org. This app is designed to run on Heroku, but could be amended to run locally or any desired server -## Setup +![App Screenshot](packageBuilder.PNG) -To set this up on your own Heroku account, this app does require some knowledge of deploying Django apps. The following Heroku resources are required: -- Heroku Postgres (or alternative database) -- Redis To Go (or Heroku Redis - but might require some minor changes) +#Python +1) Install Python version 2.7 +2) Install virtualenvwrapper-win if you have installed different Python version + +#Salesforce + +3) Login in Salesforce Org in Lighting Experience +4) Setup> Apps> App Manager > New Connected App + 4.1 Complete required fields + 4.2 Enable OAuth Settings checked + 4.3 Save + 4.4 From API (Enable OAuth Settings) you will need Consume Key, Consumer Secret, Callback URL (heroku app url), API version + +#Heroku +5) Create a Heroku account or you your own +6) (Optional) Install Heroku CLI +7) Using Shell navigate to project folder and run > + 5.1 Login in Heroku: heroku login + 5.2 to deploy>git push heroku master + +###Errors +If the deployment fails you will need to complete the following steps from your Heroku Account +8) Config Vars:{ProjectName} >Settings> Config Vars> add the following Vars + DISABLE_COLLECTSTATIC = 1 + SALESFORCE_API_VERSION = Your ORG API VERSION + SALESFORCE_CONSUMER_KEY = take it from the the step 2.4 "Consume Key" + SECRET_KEY = take it from steps 2.4 "Consumer Secret" +9) Resources: add Heroku Postgress Database or Alternative DB and Heroku Redis both are free but you need to config a credit card. + +###Logs +To view logs run > heroku logs --trail diff --git a/packageBuilder.PNG b/packageBuilder.PNG new file mode 100644 index 0000000..ded3a7e Binary files /dev/null and b/packageBuilder.PNG differ diff --git a/packagebuilder/settings.py b/packagebuilder/settings.py index 470afd9..f07d581 100644 --- a/packagebuilder/settings.py +++ b/packagebuilder/settings.py @@ -108,7 +108,7 @@ SALESFORCE_CONSUMER_KEY = os.environ['SALESFORCE_CONSUMER_KEY'] SALESFORCE_CONSUMER_SECRET = os.environ['SALESFORCE_CONSUMER_SECRET'] -SALESFORCE_REDIRECT_URI = 'https://packagebuilder.herokuapp.com/oauth_response' +SALESFORCE_REDIRECT_URI = os.environ['SALESFORCE_REDIRECT_URI'] SALESFORCE_API_VERSION = int(os.environ['SALESFORCE_API_VERSION']) SALESFORCE_REST_URL = '/services/data/v%d.0/' % SALESFORCE_API_VERSION