Learn full stack web development using Python and WEB2PY. WEB2PY is an easy to learn, integrate framework that includes a web server, admin, bootstap, and sqlite database. One simple download has everything you need to build robust, data driven web applications. This project-based course is for beginners new to web development or those who want to quickly learn a Python web framework.
Terry has over 15 years’ experience in software development from business applications to embedded systems. He has worked at a variety of government agencies and private firms including: California Senate, Office Legislative Counsel, and Space Systems Loral. In his spare time, Terry enjoys hiking and spending time with his family.
Full Stack Web Development Python WEB2PY We're continuing our Full Stack Web Development course with Python using the WEB2PY framework. In this module, we'll build a blog. We'll actually take a simple application like a blog and start from scratch and build it. We'll look at designing the database and the application looking at models and controllers and much more. We'll cover the following topics: First, we'll look at application and database design. Our application will consist of a post and view page, and then we'll define all the data elements in our blog. Next, we'll look at models and validators. Having defined our data elements, we'll code them in our model and then set up validators to ensure data integrity. SQLForms is the one of the most powerful objects in the WEB2PY framework. They make it easy to insert and update records to the database. In addition, SQLForms generate jQuery validation on the front end. Next, we'll look at retrieving records. Having inserted records, we can actually pull back those records from the database and display them to the screen. Finally, we'll design our view page, and we'll present our information in a clear and concise manner using Bootstraps. So let's get started. Let's build a blog.
Database Administration Welcome back to our Full Stack Web Development course with Python and web2py. In this module, we're going to focus on database administration. We've learned about our browser-based integrated development environments where we can edit and create code, and we're going to use that same tool to manage the database through the administration features. So in this module, we're going to cover the following topics: first, we'll learn how to import CSV files, we'll take some test database, or test data, from the internet, and we'll upload it, or import it into our model, and into our database. And once we have the files in our database, we can practice querying the database, we can try different filters, compound filters, negation, inequalities, and sort and collect the records, just the records we want to see, in our filters. Then we'll learn how to manage our database with inserts, updates, and deletes. We'll start by using the development environment where we can insert, or update, or delete, any one specific record, and then learn how to update or delete multiple records using the database administration tools. And then finally, we'll export our data back to a CSV file, and also render them in a variety of formats, such at HTML, JSON, and XML. That's one of the powers of web2py, the ability to render data in a wide variety of formats very easily. So, let's go ahead and get started.
Filtering, Sorting, Updating Records In the previous section, we looked at database administration fundamentals. We learned how to select and filter records using the database administration tools. In this section, we're going to look at filtering, sorting, and updating records using code. We'll start by learning CRUD and reviewing the SQLFORMS, but the majority of the time we'll focus on filtering and sorting records. We'll practice these applications with our contacts management application. We'll filter records, for example, in our contacts management application showing only records that start with a specific name, and then we'll sort them in a wide variety of ways, such as by last name and first name. So let's go ahead and get started, let's learn about filtering, sorting, and updating records with web2py.
Miscellaneous Topics We're learning full stack web development with Python and Web2PY. In this module we're going to talk about some miscellaneous topics and we'll start by looking at sessions. Sessions are a key component of web development and they allow us to track who an individual user is Since HTTP protocol is stateless, sessions allow us to add a little bit of continuity so we can track users and their sessions. Next after looking at sessions, we'll build some SQL form factories. Now SQL form factories are part of Web2PY, they're one of the most powerful objects within the Web2PY framework. As you recall, SQL forms allowed us to easily build frontend screens with data validation. Now SQL form factories build upon that same power, but it's not tied necessarily to a database. So you can build custom forms not connected to databases and have all the data validation that we've had before. Now we combine that with sessions and form variables, it's very powerful and we'll give an example of how we can take data in from the form, save it into a session, and then process it as needed. Finally, we'll do a demo with prime numbers. We'll take a SQL form factory form and we'll build that form and we'll just run some basic business logic as we've done before with prime numbers and we'll see how we can build interactive forms with user validation that are not tied to a database. So let's go ahead and start this module with a look at sessions.