Introduction....10
Prerequisites....10
Book Structure....11
Book Layout....13
Community....13
Conclusion....14
Chapter 1: Initial Set Up....15
The Command Line....15
Install Python 3....17
Text Editor....18
Install Git....19
Conclusion....21
Chapter 2: Docker Hello, World!....22
What is Docker?....22
Virtual Environments vs Containers....24
Install Docker....24
Docker Hello, World....25
Install Django....26
Django Hello, World....28
Pages App....29
Docker Image....32
Dockerfile....33
.dockerignore....35
docker-compose.yml....35
Git....38
Conclusion....39
Chapter 3: PostgreSQL....40
Django Set Up....40
Docker....42
Detached Mode....44
PostgreSQL....46
docker-compose.yml....48
DATABASES....49
New Database....50
Git....51
Conclusion....52
Chapter 4: Bookstore Project....53
Docker....54
PostgreSQL....56
Custom User Model....57
Custom User Forms....59
Custom User Admin....60
Superuser....61
Tests....62
Unit Tests....63
Git....64
Conclusion....64
Chapter 5: Pages App....65
Templates....65
URLs and Views....67
Tests....69
Testing Templates....70
Testing HTML....71
setUp()....72
Resolve....73
Git....74
Conclusion....75
Chapter 6: User Registration....76
Auth App....76
Auth URLs and Views....77
Homepage....78
Django Source Code....79
Log In....81
Redirects....83
Log Out....85
Sign Up....86
Tests....90
Git....92
Conclusion....92
Chapter 7: Static Assets....93
Local Development....93
STATICFILES_DIRS....94
CSS....95
Images....96
JavaScript....97
Production....98
Bootstrap....100
About Page....103
About Page Tests....105
Django Crispy Forms....106
Git....109
Conclusion....109
Chapter 8: Advanced User Registration....110
django-allauth....110
AUTHENTICATION_BACKENDS....112
EMAIL_BACKEND....112
ACCOUNT_LOGOUT_REDIRECT....113
URLs....114
Templates....114
Log In....116
Log Out....117
Sign Up....118
Admin....121
Email Only Login....122
Tests....124
Social....126
Git....126
Conclusion....126
Chapter 9: Environment Variables....127
Environs....127
SECRET_KEY....128
DEBUG and ALLOWED_HOSTS....130
DATABASES....132
Git....132
Conclusion....133
Chapter 10: Email....134
Custom Confirmation Emails....134
Email Confirmation Page....139
Password Reset and Password Change....140
Email Service....141
Git....142
Conclusion....142
Chapter 11: Books App....143
Models....143
Admin....145
URLs....147
Views....148
Templates....148
object_list....149
Individual Book Page....150
context_object_name....152
Adding URLs....153
get_absolute_url....154
Primary Keys vs. IDs....155
Slugs vs. UUIDs....155
Tests....158
Git....159
Conclusion....160
Chapter 12: Reviews App....161
Foreign Keys....161
Reviews model....162
Admin....163
Templates....166
Tests....167
Git....169
Conclusion....169
Chapter 13: File/Image Uploads....170
Media Files....170
Models....172
Admin....173
Template....174
django-storages....177
Next Steps....177
Git....178
Conclusion....178
Chapter 14: Permissions....179
Logged-In Users Only....179
Permissions....180
Custom Permissions....180
User Permissions....182
PermissionRequiredMixin....184
Groups & UserPassesTestMixin....186
Tests....186
Git....188
Conclusion....188
Chapter 15: Search....190
Search Results Page....190
Basic Filtering....192
Q Objects....193
Forms....194
Search Form....195
Git....197
Conclusion....197
Chapter 16: Performance....199
django-debug-toolbar....199
Analyzing Pages....202
select_related and prefetch_related....207
Indexes....210
Caching....211
Front-end Assets....213
Next Steps....214
Git....214
Conclusion....214
Chapter 17: Security....215
Social Engineering....215
Django updates....215
Deployment Checklist....216
docker-compose-prod.yml....217
DEBUG....218
Defaults....219
SECRET_KEY....220
Web Security....221
SQL injection....222
XSS (Cross Site Scripting)....222
Cross-Site Request Forgery (CSRF)....223
Clickjacking Protection....224
HTTPS/SSL....225
SSL Error....226
HTTP Strict Transport Security (HSTS)....227
Secure Cookies....228
Admin Hardening....229
Git....230
Conclusion....230
Chapter 18: Deployment....232
PaaS vs IaaS....232
WhiteNoise....233
Media Files....234
Gunicorn....235
Heroku....236
Deploying with Docker....236
Heroku Deployment....237
ALLOWED_HOSTS....240
Doing It Live!....241
SECURE_PROXY_SSL_HEADER....242
Production Database....243
Heroku Logs....244
Conclusion....244
Conclusion....245
Learning Resources....246
Feedback....246
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.
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.