Learn Django

Checkpoint

In this chapter you built the account list. This included creating the accounts app, model, view, template, and URL. You also learned how to build account search and pagination for long lists of accounts. In this lesson you'll verify your work.

Verify on Local Computer

To verify the work on your local computer you need to start the development server,

First, start the development 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

Then open the Account List page. On this page you should have one account. If not go to the admin page and create one or more. Then go to the Account List page and verify that you can see the account. Also verify that the account search functionality is working.

Verify on Heroku

If everything is working on your local computer you can deploy your changes to Heroku. This requires deploying the code and running the database migration.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# push changes to Heroku
(venv)$ git push -f heroku account_list:master

# create the migration
(venv)$ heroku run python manage.py makemigrations accounts

# apply the migration
(venv)$ heroku run python manage.py migrate accounts

# open the Heroku app
(venv)$ heroku open

Once the Heroku app opens login and access the account list page.

Track your progress with a free account