Grokking Django
Vote

0% completed

​

Course Overview

Who This Course Is For

How the Course Is Organized

What Each Chapter Covers

What You Will Be Able to Do

Grokking Django teaches you to build web applications with Django, the Python web framework. You start with how Django receives a request and returns a page, and you finish with APIs, caching, debugging, and error handling. Every chapter builds on the same small blog application, so the models, views, and templates you meet early on keep appearing as the course goes deeper.

The course assumes that you already know Python. You should be comfortable with functions, classes, modules, and installing packages with pip, which is the level that Grokking Python Fundamentals covers. You do not need any earlier experience with web frameworks.

Who This Course Is For

The course is written for three kinds of readers:

  • Python developers who want to move into web development and need to learn how a web application is put together.
  • Backend developers who want a working knowledge of Django's database layer, its authentication system, and API development with Django REST Framework.
  • Developers who already build user interfaces and want to understand how a Django backend produces HTML pages and JSON data for them.

How the Course Is Organized

Each lesson covers one topic and builds on the lessons before it. The code examples belong to the running blog project, and each example says which file it lives in, so you can type it into your own project and see the same result. The examples were run on current Django, and the output shown in the lessons was copied from those runs.

Each chapter ends with a set of questions that check your understanding before you move on.

What Each Chapter Covers

Introduction to Django. You learn what Django is, install it, and create your first project and app, together with a custom user model for the accounts. You then follow a request through the Model-View-Template (MVT) architecture, from the browser to the view that handles it, and through the full request-response cycle, including middleware and the different kinds of responses.

Django Models and ORM. You define models, create and apply migrations, and query the database with Django's Object-Relational Mapper (ORM). You also connect models with one-to-one, one-to-many, and many-to-many relationships.

Django Views and URL Routing. You write function-based and class-based views, map them to URL patterns, capture values from URLs, and return redirects, JSON, and error responses.

Django Templates and Static Files. You render HTML with templates, use template tags and filters, share a layout between pages with template inheritance, and serve CSS, JavaScript, and images as static files.

Handling Forms and User Input. You build forms, validate submitted data, choose widgets for each field, and use ModelForms to save form data straight to the database.

Django Authentication and User Management. You use Django's built-in authentication system to register users, store their passwords safely, log them in and out, and restrict pages to signed-in users. You also assign permissions to users and groups, write a custom authentication backend, and add a field to the project's custom user model.

Introduction to Django REST Framework (DRF). You learn what a REST API is, build a simple API with plain Django views, and then rebuild it with Django REST Framework using serializers, API views, and generic views.

Django Middleware and Caching. You write your own middleware that runs on every request and response, and you make pages faster with Django's caching framework.

Best Practices. You organize a project so that it stays easy to change as it grows, keep business logic out of views, find problems with Django's debugging tools and logging, and handle errors with custom error pages. You then secure the production settings and deploy the project.

What You Will Be Able to Do

By the end of the course, you will be able to:

  • Explain how Django turns a request into a response, and where models, views, templates, and middleware fit in that process.
  • Define models, migrate the database, and query related data with the ORM.
  • Build pages with views, URL patterns, templates, and forms.
  • Add user accounts, login, and permission checks to an application.
  • Build a REST API with Django REST Framework.
  • Use middleware and caching, and debug and handle errors in a Django project.

Reading Progress

0%


Vote for new content

On This Page

Who This Course Is For

How the Course Is Organized

What Each Chapter Covers

What You Will Be Able to Do