Learn Django

Checkpoint

In this chapter you completed the subscriber form. Now when users fill out the form, you will process their credit card and create a user account for them. In this lesson you will complete several steps to verify your work.

Verify on Local Computer

To verify the work on your local computer you are going to first fill out the new subscriber form, then check the Django admin tool to ensure the records were created.

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 Signup form. Fill out all of the fields on this form and click submit. You can use the following information for the credit card fields (this is from Stripe's testing site).

Credit card: 4242424242424242
CCV: 123
Exp: 12/2016

If successful you will get the 'Reverse for 'account_list' with arguments '()'' error. That's ok for now.

Next, open the Admin tool. Login if necessary. Check both the Users and Subscribers pages to see if the record you created in the previous step show up.

Verify on Heroku

If everything is working on your local computer you can deploy your changes to Heroku.

1
2
3
4
5
# push changes to Heroku
(venv)$ git push -f heroku subscriber_form_part_3:master

# open the Heroku app
(venv)$ heroku open

Then go to your Heroku app's signup page and fill it out to create a user (this will result in an error). After that, go to your Heroku app's admin tool to verify the records were created.

Track your progress with a free account