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 – filtering


Almost the same approach we used for sorting can be used for filtering as well, only this time it is not a single click on a column header that does the trick, but we must provide the user with a way to enter the filter values. Take a look at the following screenshot or filter the data yourself by running crm2.py again:

If you insert values in any of the input fields below the columns in the table and click on the filter button (the one with the magnifying glass icon), the list of items to show is reduced to those items that match the filter values. Note that sorting and filtering may be combined and that clicking the clear button will remove both sorting and filtering settings.

What just happened?

Let's have a look at the JavaScript code:

Chapter10/browse.js

		$("button[name=search]").button({
            icons: {
                primary: "ui-icon-search"
			},	
			text: false
        }).click(function(){
			$("input[name=pattern]",$(".content form").first())...