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 – using an enhanced presentation layer


The additional JavaScript code and CSS information is part of booksweb.js and booksweb.css respectively. The following illustrations show the end results for the page with the list of books and the page to add a new book:

We added some zebra stripes to aid readability and changed the look of the column headings.

The page to add a book had its buttons styled in the same style as the buttons on the page with the list of books. Also, the layout was cleaned up and functionality was added to present any errors returned in a clearly visible way (in the last example, the title is empty so the background is red).

What just happened?

To effect the changes seen in the previous images, we added the following lines of JavaScript to booksweb.js:

Chapter5/booksweb.js

$(".buttonbar").buttonset();
$("#newbook button[name=submit]").button({
			text: false,
			icons: {
				primary: "ui-icon-plusthick"
			}
});
$("#newbook button[name=cancel]").button(...