Forget working with long, boring lines of code! With Django at your command, make the most of your time by building professional grade web applications in minutes. With the help of a suite of useful and time-saving tools, reduce or eliminate the work needed for the most common tasks to create highly functional and flexible apps.
Learning Django Web Development will help you build a solid foundation for constructing your own web applications as quick as it gets.
Start off by installing Django and initializing your project. Analyze Django's in-built admin interfaces and utilize them to handle your application content. Furthermore, manage the data using generic views and auto-generated forms. With that, create an authentication system for your app by using login forms and finally walk through the process of deploying your application to the web.
Towards the end of the course, you'll know everything there is to know from creating your app to deploying it with the help of the invaluable features of Django.
About the Author
Matthew Nuzum has been developing web applications since 1999 and has worked for several start-ups including Canonical, the makers of Ubuntu, as well as Fortune 500 companies. He has a passion for helping others learn new technologies and has written numerous tutorials and help documents as well as running a web-focused user group based in his hometown of Des Moines.
Learn about the benefits of Django and how it helps developers work more efficiently.
To begin using Django for development, you need to install the tools required. Learn the best way to install Django and then create your first project
Django makes it easy to reuse your code by separating it into apps. In fact, many features we'll use in this series are separate apps that we'll include in our project.
A model is a simple description of the data you want to store. Some projects may need nothing more than a model.
The admin interface allows you to manage users, groups, and all the data stored in your database.
Views allow you to create web pages for your application. These pages can be plain HTML or can load data from your database.
Templates in Django can be standard HTML, XML, or plain text. This makes them simple to use for developers and designers.
Many of the web pages follow a common pattern: show simple HTML, show a list of records in the database, or show details about one record. Django's generic views simplify these common tasks.
Many of the web pages in your app share common components. We can use template inheritance to move these common pieces into a separate file in order to avoid repeating ourselves.
Django includes a simple but customizable authentication system that makes it easy to drop in a user database to your app.
It's quite common that your database structure will change over time. Django makes this easy with database migrations.
Nearly every application that has users needs to add custom fields to the user profile. Django provides tools to make this easy.
Some apps simply need to show user information from the database, but it's quite common to give users a way to add and change data. Django provides generic views for this very purpose.
The Django Debug Toolbar is an add-on app created by the Django community, which helps to look at what your web app is doing behind the scenes.
Django optimizes itself to do lazy loading, where data is loaded only when it's needed. In some common scenarios, this actually hurts performance. There is an easy solution though.
Generic Views can be subclassed and customized to enhance functionality. We'll use this capability to improve performance.
The Python community has created a standard called WSGI to deploy Python apps to the Web. It is compatible with many different kinds of servers
Preparing our application for the Web involves a few simple steps in order to make it suitable for use in production.
In this example, we'll use Apache, uWSGI, and Django on an Ubuntu server. This stack is well supported and easy to use.
We've covered a lot of ground in a short time, which is possible because Django includes many time-saving capabilities.
Packt has been committed to developer learning since 2004. A lot has changed in software since then - but Packt has remained responsive to these changes, continuing to look forward at the trends and tools defining the way we work and live. And how to put them to work.
With an extensive library of content - more than 4000 books and video courses -Packt's mission is to help developers stay relevant in a rapidly changing world. From new web frameworks and programming languages, to cutting edge data analytics, and DevOps, Packt takes software professionals in every field to what's important to them now.
From skills that will help you to develop and future proof your career to immediate solutions to every day tech challenges, Packt is a go-to resource to make you a better, smarter developer.
Packt Udemy courses continue this tradition, bringing you comprehensive yet concise video courses straight from the experts.