In this chapter you learned how to build the communications app and display its records on the accounts detail page. In this checkpoint lesson you'll verify your work. If all works well, you'll push the changes to Heroku.
Verify on Local Computer
To verify the work on your local computer you need to start the dev web server.
1 2 3 4 5 6
# make sure you're at an activated terminal/cmd in the crmeasy dir (venv)$ pwd /<your_path>/crmeasy # start the development server (venv)$ python manage.py runserver
With the web server started complete these steps:
1. Create a Communication
- Open the admin site
- Locate and open the communication app
- Click the new communication button, and fill out the fields to create a new communication. Remember which account you related the communication to
2. Open the Account Detail
- Open the Account List page
- Click on the account that you related the communication to
- Verify the communication shows up on the account detail page
Step 5: Push to Heroku
In this last step we'll push the new app and model to the Heroku app. In addition to pushing the code change we also need to run a South migration.
1 2 3 4 5 6 7 8 9 10 11
# push the files to heroku (venv)$ git push heroku communications_part_1:master # create and commit the migration (venv)$ heroku run python manage.py makemigrations communications # commit the migration (venv)$ heroku run python manage.py migrate communications # open the Heroku app (venv)$ heroku open
Once the Heroku app opens follow the steps in the previous step to verify all is working on the Heroku app.