Django Web Development Books
Django for Beginners: Build websites with Python and Django
Django for Beginners is a project-based introduction to Django, the popular Python-based web framework. Suitable for total beginners who have never built a website before as well as professional programmers looking for a fast-paced guide to modern web development and Django fundamentals.
In the book you’ll learn how to:
- Build 5 websites from scratch, including a Blog and Newspaper
- Deploy online using security best practices
- Customize the look and feel of your sites
- Write tests and run them for all your code
- Integrate user authentication, email, and custom user models
- Add permissions and authorizations to make your app more secure
Table of Contents
- Chapter 1: Initial Set Up
- Chapter 2: Hello World App
- Chapter 3: Pages App
- Chapter 4: Messsage Board App
- Chapter 5: Blog App
- Chapter 6: Forms
- Chapter 7: User Accounts
- Chapter 8: Custom User Model
- Chapter 9: User Authentication
- Chapter 10: Bootstrap
- Chapter 11: Password Change and Reset
- Chapter 12: Email
- Chapter 13: Newspaper App
- Chapter 14: Permissions and Authorization
- Chapter 15: Comments
- Chapter 16: Deployment
Boost Your Django DX
During my years working with Django, I’ve picked up many tools and techniques to boost my Developer Experience, or DX. This book covers as many of these as possible, so you can learn them too!
The book contains 12 chapters.
Below is a brief summary of the contents - for a complete breakdown see the release post.
- OriginOpening notes, a description of the included examples, acknowledgements, changelog.
- DocumentationTools to get you to the right documentation, quicker. Covers DevDocs, DuckDuckGo, Bonus Django Documentation Sites, Wget, and some miscellaneous tips.
- Virtual Environments and DependenciesManage environments, and the dependencies within, correctly and easily. Covers venv, virtualenv, pip-tools, pip-lock, recommended practices for dependency management, and Python’s development mode.
- Python ShellEnhance your Python command line experience. Covers IPython and django-read-only.
- Development ServerMake Django’s
runserverbetter. Covers django-debug-toolbar, Watchman, django-browser-reload, and Rich.
- Code Quality ToolsThe key tools to improve your code quality. Covers EditorConfig, pre-commit, Black, isort, and Flake8.
- Further Code Quality ToolsMany extra tools useful for Django development. Covers pyupgrade, django-upgrade, pre-commit-hooks, reorder_python_imports, curlylint, DjHTML, Mypy (barely!), Prettier, ESLint, and Shellcheck.
- Build Your Own ToolsHow to make your own code quality tools. Covers pre-commit’s virtual languages, how to write and test a Flake8 plugin, and how to write a pre-commit-compatible command line tool.
- SettingsTips and patterns for managing Django’s settings file. Covers structuring your settings, a template, some patterns to avoid, and testing settings files.
- Models and MigrationsTips and tools for managing your data. Covers writing a management command to seed your development database, generating data with Factory Boy, migration safeguard practices, and django-linear-migrations.
- System ChecksMake the most of Django’s built-in runtime code quality framework. Covers how system checks work, how to write and test your own checks, and django-version-checks.
- TerminusClosing notes with links to further reading, including many things that didn't make it into the book.
Django for APIs: Build web APIs with Python and Django
Django for APIs is a project-based guide to building modern web APIs with Django & Django REST Framework. It is suitable for beginners who have never built an API before as well as professional programmers looking for a fast-paced introduction to Django fundamentals and best practices.
Over the course of 200+ pages you'll learn how to set up a new project properly, how web APIs work under the hood, and advanced testing and deployment techniques. Three separate projects are built from scratch with progressively more advanced features including a Library API, Todo API, and Blog API. User authentication, permissions, documentation, viewsets, and routers are all covered thoroughly.
Django for APIs is a best-practices guide to building powerful Python-based web APIs with a minimal amount of code.
Table of Contents
- Chapter 1: Initial Set Up
- Chapter 2: Web APIs
- Chapter 3: Library Website
- Chapter 4: Library API
- Chapter 5: Todo API
- Chapter 6: Blog API
- Chapter 7: Permissions
- Chapter 8: User Authentication
- Chapter 9: Viewsets and Routers
- Chapter 10: Schemas and Documentation
- Chapter 11: Production Deployment
Speed Up Your Django Tests
At the start of March I started writing a blog post called “How to Speed Up Your Django Tests”. Before I knew it, the outline alone was 4,000 words! I realized writing it up would be a major undertaking. As lockdown arrived, I found the time to write it all up.
So, I’m delighted to announce my new book, coming May 18…
Speed Up Your Django Tests!
It’s a practical guide to making your Django project’s tests faster. It has many tips and tricks that apply to all projects, big and small. And it covers the two most popular test runners: Django’s test framework and pytest.
Reducing test run time is the easiest and safest way to increase your speed of delivery. And it’s an organic way of increasing team happiness!
The content is based on my 8 years of experience with tests on Django projects. I’ve sped up many projects’ test suites, improved Django’s own testing framework, and created several pytest plugins.
It contains 13 chapters:
- Introduction - Opening notes, how to use the book.
- Toolbox - A tour of the various tools you can use to change how your tests run.
- Measure! - The importance of profiling, with walkthroughs using two different profilers on a test suite.
- Easy Wins - 11 things you can do in 5 minutes to speed up your test suite.
- Upgrades - The importance of upgrades, and some how-to guidance to get them done easily.
- Parallelize - How to use test suite parallelization to boost your tests.
- Migrations - Reduce the overhead of building your test database.
- Database Configuration - Tweak your database’s configuration to get more speed.
- CI Configuration - And tweak your CI configuration to boost test speed too.
- Test Structure - Notes on the best structure for fast, accurate tests, and ways you can restructure.
- Test Data - The best strategies for creating data in your tests.
- Targeted Mocking - A guide to mocking, and the best libraries for mocking out specific things such as HTTP requests and time.
- Outroduction - Closing notes with extra links.
Two Scoops of Django 3.x: Best Practices for the Django Web Framework
540+ pages, 519 while in Alpha
Once again, we're releasing a book chock-full of material that will help you with your Django projects!
In Two Scoops of Django we introduce you to various tips, tricks, patterns, code snippets, and techniques that we’ve picked up over the years. This book is an update and expansion of previous editions:
- Updated for Django 3.x (which will be maintained by the Django core team until at least April 2024!)
- Updated to match changes in the Django ecosystem, with corrections and clarifications added thanks to the feedback of our readers and technical reviewers.
- Updated for Python 3.8 and/or 3.9
- Revised material on nearly every topic within the book.
- New material on GraphQL, Django REST Framework, security, forms, models, and more.
Two Scoops of Django 3.x: Best Practices for the Django Web Framework is available in PDF now, possibly Kindle, ePub, and print formats later.
A Wedge of Django: Covers Python 3.8 and Django 3.x
A Wedge of Djangois a guided walkthrough tutorial where we build a real, production-quality Django web application from the ground up.
Originally a large part of our corporate training materials, this tutorial was once only available to companies paying $3000 a seat for in-person training. The contents of this book are professional-grade and have been used by real software companies to get their engineers up and running fast with Python 3.8 and Django 3.x development.
This book is designed to build solid foundations for any developer looking to get proficient with Django fast.
Django for Professionals: Production websites with Python and Django
Django for Professionals takes your web development skills to the next level, teaching you how to build production-ready websites with Python and Django.
Once you have learned the basics of Django there is a massive gap between building simple "toy apps" and what it takes to build a "production-ready" web application suitable for deployment to thousands or even millions of users.
In the book you’ll learn how to:
- Build a Bookstore website from scratch
- Use Docker and PostgreSQL locally to mimic production settings
- Implement advanced user registration with email
- Write comprehensive tests
- Adopt advanced security and performance improvements
- Add search and file/image uploads
If you want to take advantage of all that Django has to offer, Django for Professionals is a comprehensive best practices guide to building and deploying modern websites.
Table of Contents
- Chapter 1: Docker
- Chapter 2: PostgreSQL
- Chapter 3: Bookstore Project
- Chapter 4: Pages App
- Chapter 5: User Registration
- Chapter 6: Static Assets
- Chapter 7: Advanced User Authentication
- Chapter 8: Environment Variables
- Chapter 9: Email
- Chapter 10: Books App
- Chapter 11: Reviews App
- Chapter 12: File/Image Uploads
- Chapter 13: Permissions
- Chapter 14: Search
- Chapter 15: Performance
- Chapter 16: Security
- Chapter 17: Deployment
Django 3 by Example
Learn Django 3 with four end-to-end web projects
- Learn Django 3 by building real-world web applications from scratch in Python, using coding best practices
- Integrate other technologies into your application with clear, step-by-step explanations and comprehensive example code
- Implement advanced functionalities like a full-text search engine, a user activity stream, or a recommendation engine
- Add real-time features with Django Channels and WebSockets
If you want to learn the entire process of developing professional web applications with Python and Django, then this book is for you. In the process of building four professional Django projects, you will learn about Django 3 features, how to solve common web development problems, how to implement best practices, and how to successfully deploy your applications.
In this book, you will build a blog application, a social image bookmarking website, an online shop, and an e-learning platform. Step-by-step guidance will teach you how to integrate popular technologies, enhance your applications with AJAX, create RESTful APIs, and set up a production environment for your Django projects.
By the end of this book, you will have mastered Django 3 by building advanced web applications.
What you will learn
- Build real-world web applications
- Learn Django essentials, including models, views, ORM, templates, URLs, forms, and authentication
- Implement advanced features such as custom model fields, custom template tags, cache, middleware, localization, and more
- Create complex functionalities, such as AJAX interactions, social authentication, a full-text search engine, a payment system, a CMS, a RESTful API, and more
- Integrate other technologies, including Redis, Celery, RabbitMQ, PostgreSQL, and Channels, into your projects
- Deploy Django projects in production using NGINX, uWSGI, and Daphne
Who this book is for
Table of Contents
- Building a Blog Application
- Enhancing Your Blog with Advanced Features
- Extending Your Blog Application
- Building a Social Website
- Sharing Content on Your Website
- Tracking User Actions
- Building an Online Shop
- Managing Payments and Orders
- Extending Your Shop
- Building an E-Learning Platform
- Rendering and Caching Content
- Building an API
- Building a Chat Server
- Going Live
Django 3 Web Development Cookbook
About this book
Django is a web framework for perfectionists with deadlines, designed to help you build manageable medium and large web projects in a short time span. This fourth edition of the Django Web Development Cookbook is updated with Django 3's latest features to guide you effectively through the development process.
By the end of this book, you will have become proficient in using Django's powerful features and will be equipped to create robust websites.
Mastering Django is the latest version of Mastering Django: Core—the original, best-selling programmer’s reference for Django.
Mastering Django is not just a revision of the original book—it has been completely rewritten from the ground up to meet the needs of modern Django programmers.
The main goal of this book is to make you a Django expert. By reading this book, you’ll learn the skills needed to develop powerful websites quickly, with code that is clean and easy to maintain.
This book is also a programmer’s manual that provides complete coverage of modern Django version 3 and above.
For developers creating applications for commercial and business-critical deployments, Mastering Django delivers a comprehensive, up-to-date resource for the latest versions of Django.
Build a website with Django 3
Build a website with Django 3 is the fourth edition of my popular Django beginners book, fully updated for Django 3.
Not only has the book been updated to cover the latest version of Django, but I've added install instructions for macOS users.Your complete introduction to Django 3
Build a website with Django 3 covers all the core concepts of Django to get you up and running fast:
Why Django is the premier Python framework for developing web applications
- The big picture - how Django is structured
- Django Models
- Django Views
- Django Templates
- The Django admin
- Generic views
- Simple forms
- Complex forms and model forms
- Managing Users
- Restricted content
- File uploads
- Sending email
- Deploying a Django application
This book is not about boring theory. You'll be building a fully functioning website as you learn Django. I even show you how to deploy your website to the Internet for free.