2.4 Displaying Hello World

With webpage data and URL defined, we can now see the fruits of our labor. In Example 2.5, we again turn to manage.py to make our life easy.

Example 2.5: Shell Code

$ ./manage.py runserver

Warning!

If you did not run the migrate command in Chapter 1, Section 1.7.2, you must do so before you can invoke runserver, as shown in Example 2.6.

Example 2.6: Shell Code

$ ./manage migrate

Open your browser and navigate to http://127.0.0.1:8000/. Django will greet you with “Hello World.” We have successfully created a single webpage using only MVC’s Controller.

Get Django Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.