Django + Raspberry Pi Tutorial (PART II)

UPDATE (1/11/2017): The new tutorial can be found at:

This tutorial will walk you through how to setup your first Django Web Application on your Raspberry Pi. The Django + Raspberry Pi Tutorial is is based off of the work done in the previous tutorial – Django + Raspberry Pi Tutorial (PART I).

Step1: Change

On line 35 change:

Note: I added ‘FirstApp’ which is the name of the application we created in the last tutorial.

Step 2: Change

Django uses a mapping file called which maps html addresses to views, using regular expressions. Django maps a requested url to a view which is needed for a response via regular expressions. My file looks like this:

Step 3: Head over to our /DjangoProject/FirstApp/ for an edit


My DjangoProject/FirstApp/ file looks like this

The foo is the Python import string to get to a view.

Step 4: Start the server

Step 5: Test it out!

Head over to and you should see “Hello World!” Comment if you have any issues or suggestions.

Raspberry Pi Django Complete Tutorial


You may also like...

10 Responses

  1. USMCguy says:

    You mentioned at the beggining of this tutorial, “Note: I added ‘FirstApp’ which is the name of the application we created in the last tutorial.”. However, I cannot find the reference anywhere. I even used google to search your entire site. The only mention of ‘FirstApp’ is in this tutorial. Did it get removed?

  2. Evgeny says:


    I followed all the instructions, but got the error.
    Whats my mistake?

    Unhandled exception in thread started by
    Traceback (most recent call last):
    File “/usr/local/lib/python2.7/dist-packages/django/utils/”, line 226, in wrapper
    fn(*args, **kwargs)
    File “/usr/local/lib/python2.7/dist-packages/django/core/management/commands/”, line 113, in inner_run
    File “/usr/local/lib/python2.7/dist-packages/django/utils/”, line 249, in raise_last_exception
    File “/usr/local/lib/python2.7/dist-packages/django/utils/”, line 226, in wrapper
    fn(*args, **kwargs)
    File “/usr/local/lib/python2.7/dist-packages/django/”, line 27, in setup
    File “/usr/local/lib/python2.7/dist-packages/django/apps/”, line 85, in populate
    app_config = AppConfig.create(entry)
    File “/usr/local/lib/python2.7/dist-packages/django/apps/”, line 90, in create
    module = import_module(entry)
    File “/usr/lib/python2.7/importlib/”, line 37, in import_module
    ImportError: No module named FirstApp

  1. May 19, 2015

    […] Check out the next tutorial. […]

Leave a Reply

Your email address will not be published. Required fields are marked *