Book Image

Python 3 Web Development Beginner's Guide

By : Michel Anders
Book Image

Python 3 Web Development Beginner's Guide

By: Michel Anders

Overview of this book

<p>Building your own Python web applications provides you with the opportunity to have great functionality, with no restrictions. However, creating web applications with Python is not straightforward. Coupled with learning a new skill of developing web applications, you would normally have to learn how to work with a framework as well.</p> <p><em>Python 3 Web Development Beginner's Guide</em> shows you how to independently build your own web application that is easy to use, performs smoothly, and is themed to your taste – all without having to learn another web framework.</p> <p>Web development can take time and is often fiddly to get right. This book will show you how to design and implement a complex program from start to finish. Each chapter looks at a different type of web application, meaning that you will learn about a wide variety of features and how to add them to your custom web application. You will also learn to implement jQuery into your web application to give it extra functionality. By using the right combination of a wide range of tools, you can have a fully functional, complex web application up and running in no time.</p>
Table of Contents (19 chapters)
Python 3 Web Development Beginner's Guide
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Time for action – serving a dummy application


Now that we have the necessary building blocks in place, we can start developing our application. Let's start with a very simple application:

  1. Go to the directory where you unpacked the example code.

  2. Go to the directory Chapter 2.

  3. Double-click the file nocontent.py, a text window will open (alternatively you can enter the command python nocontent.py from the command line):

  4. Open your favorite browser and enter http://localhost:8080 in the address bar. You will be presented with a rather dull page:

    Tip

    If your browser is unable to connect to http://localhost:8080, this might be because your local name server is not configured to resolve the name localhost. If you do not have the means to correct this, it is equally valid, though less convenient, to enter http://127.0.0.1:8080 in the address bar of your browser.

    It is also possible that the default port that the application will be listening on (8080) is already in use, in which case, Python will raise...